I'm looking for a way to swap Esc and Caps Lock on Linux virtual console.
In X11, I can do this with setxkbmap -option caps:swapescape
, but I don't know an equivalent in text mode. So, what can I do?
consolekeyboard-layout
I'm looking for a way to swap Esc and Caps Lock on Linux virtual console.
In X11, I can do this with setxkbmap -option caps:swapescape
, but I don't know an equivalent in text mode. So, what can I do?
Best Answer
First You Need To install "console-data"
Now use "sudo showkey" to find the keycode of your ESC and CapsLock key
My keycode for ESC was "1" and for Caps Lock was "58"
Now you need to create a .keystrings file in your home directory
In that file you'll swap the keycode's for Caps Lock and ESC ex. since the Caps Lock Key was equal to 58 before I'll make it equal to 1
Now Save and close your .keystrings file and run the following command in your TTY
The Caps Lock and Escape keys should now be swapped