---
Title: TTY Key Swap
Published: 2021-04-02 07:51
Author: Rev. Fr. Robert Bower
Tag:
layout: blog
bibliography:
---
I finally found it how to swap escape and caps locks on a tty terminal. I found the answer on Stack Exchange.
https://unix.stackexchange.com/questions/266817/how-to-reverse-esc-and-caps-lock-on-tty
@misc{console - How to reverse ESC and CAPS_LOCK on TTY, url={https://unix.stackexchange.com/questions/266817/how-to-reverse-esc-and-caps-lock-on-tty}, journal={Unix & Linux Stack Exchange} }
First You Need To install "console-data" sudo apt-get install console-data Now use "sudo showkey" to find the keycode of your ESC and CapsLock key sudo showkey My keycode for ESC was "1" and for Caps Lock was "58" Now you need to create a .keystrings file in your home directory vim ~/.keystrings 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 keycode 1 = Caps_Lock keycode 58 = Escape Now Save and close your .keystrings file and run the following command in your TTY sudo loadkeys .keystrings The Caps Lock and Escape keys should now be swapped
Zettelkasten ID **ttykeyswap-2021-04-02-0751**