0

I want that my right alt AltGr behaves as my left control Control_L in linux virtual console.

I use the showkey utility and found out that pressing AltGr generates keycode 100. So I wrote a rebind.map file with this line:

keycode 100 = Control

And then I've loaded this configuration with loadkeys $(readlink -f rebind.map)

So If I press AltGr + c it should produce the same result as Control+c. And it does, on the first press. On the second press, the keyboard becomes unusable.

How do I correctly bind my AltGr to behave as Control_L in linux virtual console?

  • Which Linux distribution are you on? – fpmurphy Sep 2 '17 at 4:30
  • @fpmurphy1 I'm on arch linux. – ninrod Sep 2 '17 at 4:31
1

Do you mean unusable as in Control seems to be pressed constantly? I just tried the same thing and had the same problem. My workaround was saving the current keymap with dumpkeys and extracting the line for the keycode I wanted to change, which was

keycode 56 = Alt ... (Alt repeated a total of 128 times)

So I changed that line to be

keycode 56 = Control ... (Control repeated a total of 128 times)

and loaded the file with that line in it via loadkeys and it seems to work now.

0

Ok, I've found the solution. I don't know exactly why it works though. The secret is to add keymaps 0-15 above the keycode 100 = Control line, like so:

keymaps 0-15
keycode 100 = Control

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.