Skip to content

Instantly share code, notes, and snippets.

@beshrkayali
Created May 5, 2022 06:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beshrkayali/d34b578c622eb89919e49abaaf43dfd0 to your computer and use it in GitHub Desktop.
Save beshrkayali/d34b578c622eb89919e49abaaf43dfd0 to your computer and use it in GitHub Desktop.
Xmodmap
! -*- coding: utf-8 -*-
! swap Ctrl and Alt keys
! default setting on special keys
! xmodmap -pke | grep -P '(Control|Super|Alt|Menu)'
! keycode 37 = Control_L NoSymbol Control_L
! keycode 64 = Alt_L Meta_L Alt_L Meta_L
! keycode 105 = Control_R NoSymbol Control_R
! keycode 108 = Alt_R Meta_R Alt_R Meta_R
! keycode 133 = Super_L NoSymbol Super_L
! keycode 134 = Super_R NoSymbol Super_R
! keycode 135 = Menu NoSymbol Menu
! keycode 147 = XF86MenuKB NoSymbol XF86MenuKB
! keycode 204 = NoSymbol Alt_L NoSymbol Alt_L
! keycode 206 = NoSymbol Super_L NoSymbol Super_L
clear control
clear mod1
clear lock
keycode 37 = Alt_L Meta_L
keycode 105 = Alt_R Meta_R
keycode 64 = Control_L
keycode 108 = Control_R
keycode 66 = Alt_L Meta_L
add control = Control_L Control_R
add mod1 = Alt_L Meta_L
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment