Update: Remapping keys in Linux

linux-category-inverted

In my previous pose, Remapping keys in Linux, I provided some instructions on how to make the right control key act like the menu key.  However, one issue was that you have to run the script after each login.

That’s more than just a little bit annoying, so I’ve tracked down how to solve that as well.

From this AskUbuntu post, it turns out that xmodmap is no longer used and instead xkb is what really needs to be updated.  The process is simple enough, edit:

/usr/share/X11/xkb/symbols/pc

find the following block of text:

 key <RTSH> { [ Shift_R ] };
 key <RCTL> { [ Control_R ] };
 key <RWIN> { [ Super_R ] };
 key <MENU> { [ Menu ] };

And change <RCTL> to Menu and <Menu> to Control_R.

Reboot and voila, the right control key now works like a menu button.

Of course, this is system wide so if you have multiple users logging in, they all get this.

One note is that the linked article does mention to delete the compiled keymaps, but there were none on my system so there was nothing to delete.

 

Greg

Greg

Greg is the head cat at JumbleCat, with over 20 years of experience in the computer field, he has done everything from programming to hardware solutions. You can contact Greg via the contact form on the main menu above.

More Posts - Website

Greg

Greg

Greg is the head cat at JumbleCat, with over 20 years of experience in the computer field, he has done everything from programming to hardware solutions. You can contact Greg via the contact form on the main menu above.

Leave a Reply