Skip to content

Instantly share code, notes, and snippets.

@rjloura
Last active January 15, 2021 10:22
Show Gist options
  • Save rjloura/bea5579bcbcbc5b9b7cc300eb09e8883 to your computer and use it in GitHub Desktop.
Save rjloura/bea5579bcbcbc5b9b7cc300eb09e8883 to your computer and use it in GitHub Desktop.
How to set capslock to escape key in xfce4

My chromebook doesn't have a caps lock key, it has a "search" key. When running crouton xfce4 is unaware of this key in the keybaord mappings GUI. This is how I ended up mapping the search/capslock key to escape.

  1. Run xev(1)
  2. Strike the capslock (aka search, or super_L key) and ook for entries like the following:
KeyPress event, serial 28, synthetic NO, window 0x2600001,
    root 0xd3, subw 0x0, time 16308538, (449,411), root:(1043,703),
    state 0x0, keycode 133 (keysym 0xff1b, Escape), same_screen YES,
    XKeysymToKeycode returns keycode: 9
    XLookupString gives 1 bytes: (1b)
    XmbLookupString gives 1 bytes: (1b)
    XFilterEvent returns: False
  1. In the above note the number next to keycode
  2. xmodmap -e "keycode <keycode> = Escape"
  3. echo 'keycode <keycode> = Escape' >> ~/.Xmodmap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment