using caps-lock to make new arrow keys

The most natural way to access the arrow keys on my laptop from a normal typing stance is to strain with my right thumb, after having made a minimal motion with my right hand. This gets to feeling pretty unpleasant after a while — my thumb does not take well to these bizarre movements.

My solution is to co-opt the IJKL key-group, using Caps-Lock as the modifier. Put the following in ~/.Xmodmap:

keycode 31 = i I Up
keycode 44 = j J Left
keycode 45 = k K Down
keycode 46 = l L Right

keysym Caps_Lock = Mode_switch

This should set things correctly every time your X session starts. To immediately see effects, run xmodmap ~/.Xmodmap. If you mess something up, setxkbmap -layout us (or other codes for other layouts) will set it right… until ~/.Xmodmap is reloaded, anyway.