Skip to content

Instantly share code, notes, and snippets.

@nnungest
Created January 5, 2019 20:14
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 nnungest/de0ef2e6b110b020174d5a87676e5d55 to your computer and use it in GitHub Desktop.
Save nnungest/de0ef2e6b110b020174d5a87676e5d55 to your computer and use it in GitHub Desktop.
linux keyboard mapping for 60% , emacs / vim friendly
#!/bin/bash
# 60% keyboard setup
# the most crucial part is running an empty -option which clears the config. enjoy!
# remap caps key as escape
# remap escape key to give you your backticks again
function code_keys () {
setxkbmap -option
setxkbmap -option ",caps:escape"
xmodmap -e "keycode 9 = grave asciitilde grave asciitilde"
}
# reset escape key to normal
# make caps control (to aviod exiting a game unintentionally and having capslock do strange things)
function game_keys () {
setxkbmap -option
setxkbmap -option ",ctrl:nocaps"
xmodmap -e "keycode 9 = Escape Escape Escape Escape"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment