[thelist] Linux Tip

Matt Liotta mliotta at r337.com
Tue Jul 9 22:59:21 CDT 2002


FYI, the technique for setting keyboard mappings in your tip affects the
entire system, not just your user account or a specific tty. If you want
to set keyboard mappings at the tty level you should use stty. Further,
you can put your stty settings in your favorite shell's rc file, so that
your keyboard mappings show on all of your ttys. Additionally, you don't
need to be root in order to set keyboard mappings using stty because it
doesn't affect the entire system.

Matt Liotta
President & CEO
Montara Software, Inc.
http://www.montarasoftware.com/
V: 415-577-8070
F: 415-341-8906
P: 4155778070 at messaging.sprintpcs.com

> -----Original Message-----
> From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]
> On Behalf Of Mark Groen
> Sent: Tuesday, July 09, 2002 9:16 AM
> To: thelist at lists.evolt.org
> Subject: [thelist] Linux Tip
>
> 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
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !




More information about the thelist mailing list