[systemd-devel] hardware/system keys/buttons

Tormen quickhelp at gmail.com
Wed Dec 26 07:21:47 PST 2012


Hi,

I would like to trigger events on my notebook hardware keys and 
independent of any X environment!
(very useful to do all sorts of things when something went south in your 
graphical environment)

     (a) systemd is already reacting to the power button and lid switch (!)
     (b) part logind is already listening to *all* possible input event 
sources:

Dec 04 09:55:07 seven systemd-logind[1126]: Watching system buttons on 
/dev/input/event3 (Sony Vaio Keys)
Dec 04 09:55:07 seven systemd-logind[1126]: Watching system buttons on 
/dev/input/event4 (Sony Vaio Jogdial)
Dec 04 09:55:07 seven systemd-logind[1126]: Watching system buttons on 
/dev/input/event2 (Power Button)
Dec 04 09:55:07 seven systemd-logind[1126]: Watching system buttons on 
/dev/input/event1 (Lid Switch)

... so the necessary infrastructure to react to all sorts of 
input/events is in place (*)
and already used, but seemingly (?) limited to power buttons.

... wouldn't it be nicer to flexibly allow the treatment of all sorts of 
input events to give the user the freedom to decide how to use systemd's 
capability to listen to system/hardware keys/buttons and react to them ?

Because I would love to throw out my "actkbd" - a simple unmaintained 
service that also registers itself to - but only one - /dev/input/event* 
and able to launch commands.

I really think systemd should be more flexible at this point.

Or did I miss something ??

Thanks a lot for any explanation / help in advance!

Best,

Tormen.

(*) and the only other player I see at this level (without X) is "udevd",
which is [and cannot be] not responsible for such events (e.g. "udevadm 
monitor all" shows nothing when pressing the "Assist key")
which I guess makes sense, because the device is not removed or added, 
but /used/ in this case...



More information about the systemd-devel mailing list