xkb: how to map symbol Meta to key Alt

Maciej Pilichowski bluedzins at wp.pl
Sat Mar 19 14:46:37 PDT 2011


Hello,

  How to map symbol Meta to key Alt?

My previous mappings:
---------------------

In opensuse 11.1 I simply edited xfree86 keycodes files, and put for 
keycodes AltL/AltR scancodes MetaL/MetaR. It worked without any 
problems with X11.

Now:
----

I have opensuse 11.4 and editing xfree86 simply does not work (it is 
completely strange for me, because this file is mentioned in the 
config files). I put the same table as for 11.1 and Alt was still 
Alt.

So I tried to edit symbols file, but no matter what I try, no success. 
In all cases, xev reports (when pressing Alt) that Meta key was 
pressed, however X11 still recognizes Alt as Alt -- for example when 
running Firefox, I press Alt+F and File menu opens, or I press 
Alt+Tab, and I get windows list.
  Since I have my entire layout defined for national characters as 
Meta+key, I can also check if I get national characters (óąłäö, 
etc.) -- I don't get them.

  My tries:
key <LALT> { [ Meta_L ] }; // (*)
modifier_map Mod3 { <LALT>, <RALT> };

or

key <LALT> { [ Meta_L, Meta_L ] };
modifier_map Mod3 { <LALT>, <RALT> };

or

key <LALT> { type[Group1] = "ONE_LEVEL",
              symbols[Group1] = [ Meta_L ] };
modifier_map Mod3 { <LALT>, <RALT> };


I also tried to add "replace" before "key", over and over same results 
(as you can see, I am/was pretty despair ;-) ).

  So how to do it with xkb? I could do it with xmodmap, but I prefer 
xkb -- after switching layout xmodmap is killed.

  Thank you in advance for help.

Kind regards,

(*) the entries are doubled, for right Meta/Alt.



More information about the xorg mailing list