Skip to content

Instantly share code, notes, and snippets.

@bootandy
Created June 27, 2024 20:51
Show Gist options
  • Save bootandy/54f09cee2ef2e2f69e240a969a058022 to your computer and use it in GitHub Desktop.
Save bootandy/54f09cee2ef2e2f69e240a969a058022 to your computer and use it in GitHub Desktop.
xmodmap for tweaking keyboard. Swap CapsLock Escape. Swap CTRL ALT.
! See keys with:
! xev
! Clear memory:
! setxkbmap -option
!
! Use this file:
! xmodmap ~/.Xmodmap
!
!setxkbmap -layout gb -option ctrl:nocaps
!xmodmap -e "keycode 9 = Caps_Lock NoSymbol Caps_Lock"
!xmodmap -e "keycode 66 = Escape NoSymbol Escape"
keycode 9 = Caps_Lock
keycode 66 = Escape
clear control
clear mod1
add control = Control_L Control_R
add mod1 = Alt_L
!add mod5 = Alt_R
! Make LeftAlt -> LeftControl
keycode 64 = Control_L
! Make LeftCtrl -> LeftAlt - you need the add and clears above for these to work
keycode 37 = Alt_L
! Make Alt-GR -> LeftAlt
!keycode 92 = Alt_L
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment