I'd like to remap the altgr key to AC10 key. So far, I edited /usr/share/X11/xkb/symbols/us as follows:

// key <AC10> { [ semicolon,  colon   ] };
   key <AC10> { [ Alt_R ]}  


$ cd /var/lib/xkb; sudo rm *
$ setxkbmap us
Error loading new keyboard description

Is there a way to achieve this mapping? I'd like to use AC10 as Alt_R. semicolon and colon will be mapped on some other keys.

I achieved this behavior in xmodmap

keycode 47 = ISO_Level3_Shift

And wonder if it's possible in xkb too.


The parsing error when loading your modified file is due to the missing semicolon at the end of the line; fix it and it will load.

But if you change AC10 key to send Alt_R, then it will send just an Alt modifier; if you want AltGr, that is, a key to access 3rd level symbols, then you have to send ISO_Level3_Shift:

key <AC10> { [ ISO_Level3_Shift ] };
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.