xmodmap
From Noah.org
Move keys around the keyboard
#!/bin/sh # set up keyboard to exchange the Shift and Up keys, and the Down and Right keys #xmodmap -e "clear Shift" #xmodmap -e "keycode 62 = Up Prior" #xset r 62 # repeat Up key #xmodmap -e "keycode 102 = Down Next" #xmodmap -e "add Shift = Shift_R" #xmodmap -e "add Shift = Shift_L" xmodmap -e "keycode 114 = Down" # => Down xmodmap -e "keycode 62 = Up" # => Up xmodmap -e "keycode 111 = Shift_R" # => Shift xmodmap -e "keycode 116 = Right" # => Right xmodmap -e "add shift = Shift_R" # Make the new Shift key actually shift xset r 114 # repeat Down key xset r 62 # repeat Up key xset -r 111 # don't repeat new Shift key