[thelist] Linux Tip
Mark Groen
mark at markgroen.com
Tue Jul 9 21:54:01 CDT 2002
My last post still isn't showing until I add this tip to it I 'spose:
<tip type="linux">
If you work in the console, you can redefine the keyboard-mappings of any
key, so that this key executes any command of your choice.
For this to work, you first need to find out the keycode of the desired key,
e.g. F12. You do this by executing showkey, and then pressing F12.
Showkey will now show you this output:
$ showkey
press any key (program terminates after 10s of last keypress)...
keycode 28 release
keycode 88 press
keycode 88 release
Keycode 28 (release) means that you just released your ENTER-key.
Keycode 88 (press and release) is shown because you just pressed and
released F12. The showkey command will end after you have waited 10
seconds without pressing any key.
Repeat this procedure as often as nessesary to find out all the keycodes you
need.
Now we can change the so-called Kernel String Table , by issueing the
command loadkeys, and then entering your strings.
$ loadkeys
keycode 88 = F12
keycode 125 = F40
string F12 = "ls\n"
keycode F40 = "mikmod -rp /usr/local/data/mod/*.mod\n"
Now press CTRL-d to leave loadkeys. That's it.
</tip>
Cheers,
Mark
More information about the thelist
mailing list