Skip to content

Instantly share code, notes, and snippets.

@rek
Last active January 9, 2020 08:48
Show Gist options
  • Save rek/19b5ccb62a717a77dbbff9c818690d3a to your computer and use it in GitHub Desktop.
Save rek/19b5ccb62a717a77dbbff9c818690d3a to your computer and use it in GitHub Desktop.

1: re-map capslock at key mapping level

// find a key code
xev | grep keycode
// re-map them
xmodmap -e "keycode 49 = asciitilde"
xmodmap -e "keycode 66 = grave"

// to save them:
// put the above keycode parts into a .modmap file, and add the .xsession from devconfig to load it each time

2: OR you can change it at lowest level:

// diable caps lock default behavior
xmodmap -e 'clear Lock'    

// change caps to be: ´:
sudo vi /usr/share/X11/xkb/symbols/pc   
// key <CAPS> {        [ acute                 ]       };
// i also change this guy:
// key <RCTL> {        [ Delete                ]       };

// reload mappings to test
setxkbmap -layout us
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment