Take the 2-minute tour ×

Hey guys, I would like to map my "WASD" to the arrows.

I don't like moving my hands around. I already fixed it for my editor by calling W for arrowUp.

But, how can I bind it for the entire system? When I call W, I want it to call the arrow UP.

I can't bind those keys one software at the time.

Any ideas?



share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

To determine the keycodes for keys on your keyboard, you can run a program called "xev". When running, you just press keys and you'll see the codes appear in the program. By keeping track of these you can make changes to the keys that need updating.

Then, you use a commandline program called "xmodmap (http://cf.ccmr.cornell.edu/cgi-bin/w3mman2html.cgi?xmodmap(1))" to remap a keystroke. So for instance:

 xmodmap -e 'keycode 234=F2'

This would remap the key on the keyboard that generates keycode signal 234 to now be treated as the "F2" key. You can read the xmodmap documentation online to determine how to refer to various keystrokes.

So then you can build up a list of xmodmap lines, and put them all in a script that gets executed at login time, so that your keyboard is mapped the way you like.


share|improve this answer
add comment

Your Answer


