13

I'm trying to do the typical remapping of capslock to control, but I also want to remap left control to be a second super key. I can do this fine with xmodmap, but as soon as I switch to a virtual terminal (ie what comes up when you hit ctrl-alt-f1), I'm back to being stuck with default key mappings. So what I'm mainly looking for is a way to remap the keys in the virtual terminals as well.

I'm ok with having to use xmodmap for stuff in X, and a separate method for virtual terminals, but I'd prefer to do something that handles both situations if possible.

2
7

You will need to use loadkeys for your console. See also keymaps and dumpkeys.

2
9

From askubuntu.com

As far as your caps->ctrl goes, this works. You might be able to use this same method to remap your super key as well.

sudo vi /etc/default/keyboard

Now find the line that starts with XKBOPTIONS, and add ctrl:nocaps to make caps an additional ctrl or ctrl:swapcaps to swap them.

For example, mine looks like

XKBOPTIONS="lv3:ralt_alt,compose:menu,ctrl:nocaps"

then run

sudo dpkg-reconfigure keyboard-configuration

The reason this way is better is that it will take effect on the virtual consoles (e.g. ctrl+alt+F1) as well as in the graphical desktop.

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.