Skip to content

Latest commit

 

History

History
37 lines (22 loc) · 798 Bytes

xmodmap.md

File metadata and controls

37 lines (22 loc) · 798 Bytes

Use xmodmap in terminal to swap Caps Lock with Esc

xmodmap -e "keycode 9 = Caps_Lock NoSymbol Caps_Lock"   #this will make Esc to act as Caps Lock
xmodmap -e "keycode 66 = Escape NoSymbol Escape"        #this will make Caps Lock to act as Esc

To get this change for every session, after you have run the ​​previous commands create a file called .xmodmap with the new keymaps, using the following command:

xmodmap -pke > ~/.xmodmap

Then, create a file called .xinitrc in your home directory, containing the following line/command:

xmodmap .xmodmap

DEBIAN

    Run:

    cd /etc/default/
    vim keyboard

    There you will see the line:

    XKBOPTIONS=""

    Change it to:

    XKBOPTIONS="caps:swapescape"

    Exit Vim with save:

    :wqa

    Reboot.