Skip to content

Instantly share code, notes, and snippets.

@hunner
Created March 21, 2012 21:54
Show Gist options
  • Save hunner/2153478 to your computer and use it in GitHub Desktop.
Save hunner/2153478 to your computer and use it in GitHub Desktop.
caps->ctrl->esc->caps
clear Lock
clear Control
keycode 9 = Caps_Lock NoSymbol Caps_Lock NoSymbol Caps_Lock
keycode 37 = Escape NoSymbol Escape NoSymbol Escape
keycode 66 = Control_L NoSymbol Control_L NoSymbol Control_L
add Lock = Caps_Lock
add Control = Control_L Control_R
user% xmodmap -pke > backup.pke
user% xmodmap escctrlcaps.pke
@jesusaurus
Copy link

Key 37 gives more than just an Escape when pressed.
The output from xev after pressing 37 a few times:

KeyPress event, serial 28, synthetic NO, window 0x2200001,
root 0x14e, subw 0x0, time 151035930, (323,413), root:(324,433),
state 0x10, keycode 37 (keysym 0xff1b, Escape), same_screen YES,
XLookupString gives 1 bytes: (1b) " Escape), same_screen YES,
XLookupString gives 1 bytes: (1b) "ives 1 bytes: (1b) " Escape), same_screen YES,
XLookupString gives 1 bytes: (1b) "ives 1 bytes: (1b) " Escape), same_screen YES,
XLookupString gives 1 bytes: (1b) "ives 1 bytes: (1b) " Escape), same_screen YES,
XLookupString gives 1 bytes: (1b) "ives 1 bytes: (1b) " Escape), same_screen YES,
XLookupString gives 1 bytes: (1b) "9), width 178, height 178,
border_width 1, above 0x1c00027, override NO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment