Skip to content

Instantly share code, notes, and snippets.

@kekru
Last active October 28, 2018 13:36
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 kekru/97c4596fb58492b4d39824a0adc0303f to your computer and use it in GitHub Desktop.
Save kekru/97c4596fb58492b4d39824a0adc0303f to your computer and use it in GitHub Desktop.
Ubuntu map keybooard special key

My low cost keyboard does not have a less/greater/pipe key....
So I mapped a special key, to the less/greater/pipe key

# find out the keycode of the special key, for me it was 148
xev
# set Strg_r to Mode_switch -> Strg_r + special key will print pipe
sudo xmodmap -e "keycode 0x69 = Mode_switch Mode_switch Mode_switch Mode_switch" 
# set key binding for special key. Replace the keycode with your keycode  
sudo xmodmap -e "keycode 148 = less greater bar"

See also
https://askubuntu.com/questions/24916/how-do-i-remap-certain-keys-or-devices
https://unix.stackexchange.com/questions/249122/why-do-my-xmodmap-binds-involving-altgr-only-work-on-some-keys

Revert settings to german keyboard

setxkbmap de

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment