This is not quite what you want, but you can write a script that switches the hard xmodmap h, j, k, l to the arrow display.
For example:
#!/bin/bash if [ `cat /var/layout` == "normal" ]; then xmodmap -e 'keycode 43 = Left' ... echo "hjkl" > /var/layout else xmodmap -e 'keycode 43 = h' ... echo "normal" > /var/layout fi
(Use xev to search for key codes)
Then you can call it using the global window manager hotkey. Probably all window managers are able to do this more or less well. If you're lucky, you can even bind a scroll lock to it.
johannes_lalala
source share