Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 2 down vote accepted

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 ] };
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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