How do I prevent xfce terminal from grabbing the Alt key?

Chris G cl at isbd.net
Wed Nov 3 11:59:51 CET 2010


On Wed, Nov 03, 2010 at 05:54:56AM +0100, Mike Massonnet wrote:
> > I'm running the default xfce4-terminal on xubuntu 10.04, i.e. the one
> > installed from the standard repositories.
> >
> > It reports itself that it is: Terminal 0.4.3.
> >
> > It's not that shortcuts are not working, it's that xfce4-terminal is
> > 'stealing' any key entered with the left Alt key. So instead of getting
> > a character appearing when I hit Alt + <a key> I get nothing in almost
> > every case.  So, for example, if I'm in an old-fashioned xterm and I
> > hold the Alt key down and hit each key across the bottom of the keyboard
> > I get a series of characters as follows:-
> >
> >    Üúøãöâîí¬®¯
> >
> > (in case the intervening mail systems are not perfect that's:-
> >    U with an umlaut
> >    u with an acute accent
> >    o with a line through it
> >    a with a squiggly thing on top
> >    o with an umlaut
> >    a with a circumflex accent
> >    i with a circumflex accent
> >    i with an acute accent
> >    line with a corner
> >    "Registered" symbol
> >    Overline
> >
> > If I do the same in an xfce4-terminal I get *nothing*.
> 
> Weird, I never noticed something like that in Xterm, I'll have to try.
> But it sounds like this is Xterm specific and has nothing to do with
> Terminal "stealing" the Alt key.
> 
It works *everywhere else* except xfce4-terminal and gnome-terminal, the
above Alt + key combinations are standard, you can find them documented
if you Google for them.

> Did you try to use "Alt Gr" instead of "Alt"? I believe the problem
> will reproduce with any VTE based terminal, for example gnome-terminal
> or sakura. If you type "AltGr + r" it should print ®, or "AltGr + c"
> produces ©.
> 
The Alt Gr combinations work OK.  I have a table I gleaned from the
internet somewhere which is as follows (dependent on intermediate
character handling of course) :-

         Unshifted       Shifted                         Unshifted        Shifted
  Key   Alt    AltGr   Alt    AltGr               Key   Alt    AltGr    Alt    AltGr
   `     à       |      ¬
   1     ±       ¹      ¡       ¡                  A     á       æ       Á       Æ
   2     ²       ²      ¢                          S     ó       ß       Ó       §
   3     ³       ³      £       £                  D     ä       ð       Ä       Ð
   4     ´              ¤       ¼                  F     æ               Æ       ª
   5     µ       ½      ¥                          G     ç               Ç
   6     ¶       ¾      Þ                          H     è               È
   7     ·              ¦                          J     ê               Ê
   8     ¸              ª                          K     ë               Ë
   9     ¹              ¨       ±                  L     ì               Ì
   0     °              ©       °                  ;     »               º
   -                    ß       ¿                  '     §               À
   =     ½              «                          #     £               þ

   Q     ñ              Ñ                          \     Ü               ü       ¦
   W     ÷              ×                          Z     ú       «       Ú       <
   E     å              Å                          X     ø       »       Ø       >
   R     ò       ¶      Ò       ®                  C     ã       ¢       Ã       ©
   T     ô              Ô                          V     ö               Ö
   Y     ù              Ù       ¥                  B     â               Â
   U     õ              Õ                          N     î       n       Î       N
   I     é              É                          M     í       µ       Í       º
   O     ï       ø      Ï       Ø                  ,     ¬               ¼       ×
   P     ð       þ      Ð       Þ                  .     ®       ·       ¾       ÷
   [     Û              û                          /     ¯               ¿
   ]     Ý              ý

As I said in xfce4-terminal only the AltGr combinations work but elsewhere
the Alt ones work as well.  You're right that it's probably all VTE based
terminals that 'steal' the Alt key, certainly gnome-terminal does.  All of the 
xterm derived terminals - lxterm, xterm, uxterm work OK.

> On a side note, if you run a ncurses application like
> midnight-commander (mc) inside Terminal, Alt should work as expected
> to open menus, etc.
> 
I *don't* expect Alt to open menus, I expect it to act as a shift
character the same as AltGr does.  Running my editor (vile) in
xfce-terminal I don't get the expected Alt characters but if I run the
GUI version (xvile) then the Alt shifted characters work.

OK, if I assign a few Alt+x characters to specific functions then
that's what those will do but all the other Alt+x characters should
work as shown above.

-- 
Chris Green



More information about the Xfce mailing list