Originally Posted by filker0
This is very system dependent. In windows, you'd set up a keyboard hook and translate the scan codes as they come in. In X-Windows, you do something very similar, though there are easier ways to do it in X-Windws (just set up a keymap, load it, and let the existing keyboard handling do the magic for you). I suspect that it is possible to load alternative keymaps for the Linux console as well, but I'm not sure how to do it. Dvorak keyboards are sufficiently well known that there may be some way already provided in the linux distro to switch to that layout.