Skip to content

Instantly share code, notes, and snippets.

@ngnguyen1
Last active July 8, 2020 18:52
Show Gist options
  • Save ngnguyen1/6d2db9b41f23e4900870bb24884a1cd3 to your computer and use it in GitHub Desktop.
Save ngnguyen1/6d2db9b41f23e4900870bb24884a1cd3 to your computer and use it in GitHub Desktop.
! `xev` and `showkey` to see which keycode is pressed
!old keys
!xmodmap -pke |grep Something
!keycode 50 = Shift_L ISO_Prev_Group Shift_L ISO_Prev_Group
!keycode 62 = Shift_R ISO_Next_Group Shift_R ISO_Next_Group
!keycode 66 = Caps_Lock NoSymbol Caps_Lock
!keycode 22 = BackSpace BackSpace BackSpace BackSpace NoSymbol NoSymbol Terminate_Server
!keycode 37 = Control_L NoSymbol Control_L
!keycode 133 = Super_L NoSymbol Super_L
!keycode 64 = Alt_L ISO_Prev_Group Alt_L ISO_Prev_Group
!Alt_R
!keycode 108 = Mode_switch ISO_Next_Group Mode_switch ISO_Next_Group
!keycode 203 = Mode_switch NoSymbol Mode_switch
!keycode 135 = Menu NoSymbol Menu
!keycode 105 = Control_R NoSymbol Control_R
!new keys
!Double Shift makes Caps_Lock
keycode 50 = Shift_L Caps_Lock Shift_L Caps_Lock
keycode 62 = Shift_R Caps_Lock Shift_R Caps_Lock
keycode 66 = BackSpace
keycode 22 = Delete
keycode 37 = Super_L
keycode 133 = Alt_L
keycode 64 = Control_L
!Alt_R
keycode 108 = Control_R
keycode 105 = Menu
!Super_R
!keycode 134 = Super_R NoSymbol Super_R
keycode 134 = Alt_R
!! Super_R is now AltGr aka Multi_key
!keycode 135 = Super_R
!keycode 135 = ISO_Level3_Shift Multi_key ISO_Level3_Shift Multi_key
!keycode 36 = Return NoSymbol Return NoSymbol Return Return
!! Enter aka Return is now AltGr aka Multi_key
keycode 36 = ISO_Level3_Shift Multi_key ISO_Level3_Shift Multi_key
!xmodmap -pke > modmap
!xmodmap -pm >> modmap
!shift Shift_L (0x32), Shift_R (0x3e)
!lock Caps_Lock (0x42)
!control Control_L (0x25), Control_R (0x69)
!mod1 Alt_L (0x40), Meta_L (0xcd)
!mod2 Num_Lock (0x4d)
!mod3
!mod4 Super_L (0x85), Super_L (0xce), Hyper_L (0xcf)
!mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)
clear lock
clear control
clear mod1
clear mod4
clear mod5
add Control = Control_L Control_R
add mod1 = Alt_L Alt_R
add mod4 = Super_L Super_R
! Shift + space used to equal middle dot ·
!keycode 65 = space U00B7
! Shift + space = Enter aka Return
keycode 65 = space Return
! AltGr + Qwerty's E/S/D/F => Up/Left/Down/Right
keycode 26 = period greater period greater Up U201D guillemotright
keycode 39 = o O o O Left Oslash oslash Oslash o O oslash Oslash
keycode 40 = e E e E Down AE ae AE e E ae AE
keycode 41 = u U u U Right Eacute eacute Eacute u U eacute Eacute
! AltGr + Qwerty's Q/A => PageUp/PageDown aka Prior/Next
keycode 24 = semicolon colon semicolon colon Prior dead_diaeresis dead_diaeresis dead_diaeresis semicolon colon dead_diaeresis dead_diaeresis semicolon colon dead_diaeresis dead_diaeresis
keycode 38 = a A a A Next Aring aring Aring a A aring Aring a A aring Aring
! this is for testing xmodmap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment