Skip to content

Instantly share code, notes, and snippets.

@kekru kekru/map-keyboard-key.md
Last active Oct 28, 2018

Embed
What would you like to do?
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
You can’t perform that action at this time.