How can I change key bindings for a single key? I know that there are software like xmodmap and so on, but with this I can't map my key bindings, because with xmodmap I first have to press the keys that I want to change, but I can't because the key f doesn't work anymore. So I just want to change f (which doesn't work) to another, more useless key. How to do that? Thx
Xmodmap doesn't need "to press the keys". Did you read man xmodmap(1)?
All you have to do is to set key, like for example
$ xmodmap -pke | grep F12 keycode 96 = F12 F12 F12 F12 F12 F12 XF86Switch_VT_12 F12 F12 XF86Switch_VT_12 $ xmodmap -e "keycode 96 = f F"
First line shows keycode for F12 and second (command) sets keycode 96 to be 'f'.
You can see all keycodes with -pke option. It can also be used as backup.
# save current key map to file: $ xmodmap -pke > xmodmap.bak # you can view it with: $ less xmodmap.bak # restore from backup: $ xmodmap xmodmap.bak
Last thing you have to do is put it in
~/.Xmodmap so your setting will load automatically with X server start.
$ echo "keycode 96 = f F f F" >> ~/.Xmodmap
This should hopefully solve automatic load of the setting.