Re: Proposal: Hotkey-handling with kerneld

Gonzalo Tornaria (gtornari@varela.reu.edu.uy)
Thu, 25 Apr 96 22:47:46 GMT


Martin Buck <martin-2.buck@student.uni-ulm.de> wrote:

> How about implementing the ability to handle hotkeys on the console
> (besides Spawn_Console)? Having something like this seems very
> useful to me, for example for (un)mounting removable media, doing
> screen-hardcopies and adding a insert-text key for selection (like
> Shift-Ins in xterm).

I add: Play/Stop/Eject audio cd's, using selection w/o mouse, etc..

> Implementing a much more general interface than the current
> Spawn_Console could be done very easily: The only changes required
> in the kernel would be a few extra keysyms and a handler for them
> that calls request_module() with an argument like "hotkey-%d".
> kerneld could then either spawn a process that handles all hotkeys
> and decides what to do, or run different programs depending on which
> hotkey was pressed. The latter one would require a config-file for
> kerneld that allows you to control which programs to run,
> but IMHO this seems to be necessary anyway to contol other aspects
> of kerneld's behaviour.

> If there's nobody else working on something like this, I'll start
> implementing it myself. Any comments or problems I've overlooked?

I've done something like that.. I added a handler for some extra
keysyms, but I don't use request_module() but kerneld_send(), and a
special channel. I have a daemon that gets the messages and pass them
to a script (independient of kerneld).

I'll put it in <http://www.cmat.edu.uy/~tornaria/consoled/>.
Everybody feel free to download and try it, and email me comments,
ideas, whatever.

Gonzalo