I am running Debian 9. I bought a new keyboard that I love, but the BackSpace key is very small. I would like to assign BackSpace to the right Super key or Menu key (also on the right lower side).

For my Vim usage, in /etc/default/keyboard, I was able to swap the Escape key and Caps Lock key with:
This works perfect. It works in a console (I believe the two packages console-common and console-data may be required), in the GUI, and system wide as I'd like. How could I also assign the BackSpace key to Super_R or Menu? Something like the following does not work (after rebooting of course):

Where could I find a full list of the key names used in the /etc/default/keyboard file? Thanks


I was able to get the correct key names by looking at the file, /usr/share/X11/xkb/symbols/pc. The key names used in /etc/default/keyboard are on the left side in angle brackets, for example:
key <BKSP> { [ BackSpace, BackSpace ] };

If you want to change out keys at the graphical level but system wide, you can change it in /usr/share/X11/xkb/symbols/pc. (Make sure the file corresponds though to XKBMODEL in /etc/default/keyboard.) Just change out the names you want on the right side. I was thankful for this article. If you want to change it at the system level, in X and in the console, you can change the information in /etc/default/keyboard. Now my /etc/default/keyboard has this line, and I achieved my desired result to assign the BackSpace to my Super_R key.
(The above also includes where I swap Caps_Lock and Escape.)

Update: The above method in changing the /etc/default/keyboard file does not seem to work or at best does not have consistent results. However, changing the /usr/share/X11/xkb/symbols/pc file does work. In my experience, sometimes the key assignment in the latter file works in a console and sometimes not.

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.