Skip to content

Create a tty keymap which switches the ESC and CAPS_LOCK keys

License

Notifications You must be signed in to change notification settings

sgorblex/capsesc-keymap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

capsesc tty keymap

capsesc.sh is a script that creates a tty keymap which switches the esc and caps_lock keys. This is very useful since the average user has way more keypresses for esc as opposed to caps_lock, which is more easily reachable in a tipical keyboard layout. For example, it is very useful for Vim users.

Switching the esc and caps_lock keys in the graphical interface is quite easy, for example in X you might just run setxkbdmap -option caps:swapescape. In the tty this is not so easy, since you need to create a custom keymap. The script aims to do so automatically, by creating a keymap either over the current one or over a specified one.

Usage

As in capsesc.sh --help:

capsesc.sh: create a tty keymap with the caps_lock and esc keys switched.

USAGE:
capsesc.sh [OPTIONS] [MAP_NAME]

If neither --load nor --install are specified, leaves the new keymap in the current directory.

OPTIONS:
-l, --load			Load keymap after creating it (requires root privileges)
-i, --install NEW_NAME		Install keymap in after creating it (requires root privileges)
				(puts it in /usr/share/kbd/keymaps/custom)
-h, --help			Show this help

License

MIT

About

Create a tty keymap which switches the ESC and CAPS_LOCK keys

Topics

Resources

License

Stars

Watchers

Forks

Languages