Home

Tags

Key binding in linux

2016-11-09 linux key binding keys

Change key bindings

You can use utils xev to get key codes, syntax: xmodmap -e "keycode KEYCODE = VALUES", values order:

Key, Shift+Key, mode_switch+Key, mode_switch+Shift+Key, AltGr+Key, AltGr+Shift+Key

Examples

xmodmap -e "keycode 51 = apostrophe quotedbl NoSymbol NoSymbol grave asterisk"  # ' " ` *
xmodmap -e "keycode 21 = slash bar NoSymbol NoSymbol backslash"

xmodmap -e "keycode 11 = 2 at"
xmodmap -e "keycode 13 = 4 dollar"

xmodmap -e "keycode 34 = bracketleft braceleft NoSymbol NoSymbol aring Aring"
xmodmap -e "keycode 35 = bracketright braceright"

xmodmap -e "keycode 49 = asciicircum asciitilde NoSymbol NoSymbol grave"  # ^ ~ `
xmodmap -e "keycode 59 = semicolon comma"  # ; ,

xmodmap -e "keycode 38 = a A aring Aring"
xmodmap -e "keycode 32 = o O odiaeresis Odiaeresis"
xmodmap -e "keycode 33 = p P adiaeresis Adiaeresis"

Change right Alt to Mode_switch

xmodmap -e 'keycode 108 = Mode_switch'

Enter by capslock

xmodmap -e 'keycode 66 = Return'  # enter by capslock
xmodmap -e 'clear Lock'

Reset mapping

setxkbmap -layout se  # reset mapping

Set Alt+w for operation "show all windows"

dconf write /org/compiz/profiles/unity/plugins/scale/initiate-key "'<Alt>w'"

Set mouse speed

xset m 00  # mouse

comments powered by Disqus