advice on adding functions to use with "loadkeys" (keyboard.c maybe?)

Andrej Hocevar (drejcica@volja.net)
Sat, 7 Jun 2003 19:48:00 +0200


Hello,
in many trivial situations, one cannot make good use of common
techniques for mapping certain functions to certain keys in the
console. For example, using "loadkeys" to make F1 start
"fetchmail\n" or something similar is convenient in most cases. But
if one wants to make it change the keyboard-layout (like "loadkeys
us"), it won't make much sense to use the previous approach, since
it won't work from within an editor. Instead, a solution would be to
map a key to "KeyboardSignal" and point it to a script from
/etc/inittab.

Now here's my question: the last approach is good but even if one
maps multiple keys to the same signal, I don't see a way for the
script to know which key was pressed to run it. So I thought I could
add some custom functions to do mostly trivial tasks, maybe something
like "ls -l" to test its functionality, and then use "loadkeys" to
map a key to that new function. Is this possible? Is it a good idea
at all?

Thanks,
andrej

-- 
echo ${girl_name} > /etc/dumpdates
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/