Package: acpid
Version: 1:2.0.6-1
Severity: wishlist
Tags: upstream patch
Hello,
I think that it is reasonable to add support for the very common CD
play/pause and related buttons found on many notebooks, as acpid
already reacts to the volume control buttons and video buttons. This
will help to keep the number of running daemons at the minimum in
minimalistic setups (there is esekeyd, but it is quite primitive and
not very reliable because it does not monitor the changes in
/dev/input/).
I attach a very simple patch to achieve this. I placed the CD buttons
in a separate "category": cd/*, so that their events will not
interfere with other button events, but this can be changed, of course.
--
Stanislav
diff -urN acpid-2.0.6-debian/input_layer.c acpid-2.0.6/input_layer.c
--- acpid-2.0.6-debian/input_layer.c 2010-03-28 17:15:28.000000000 +0400
+++ acpid-2.0.6/input_layer.c 2010-10-17 16:13:46.968941481 +0400
@@ -115,6 +115,15 @@
"button/volumeup VOLUP 00000080 00000000"},
{{{0,0}, EV_KEY, KEY_MUTE, 1},
"button/mute MUTE 00000080 00000000"},
+ /* cd play/pause buttons */
+ {{{0,0}, EV_KEY, KEY_NEXTSONG, 1},
+ "cd/next CDNEXT 00000080 00000000"},
+ {{{0,0}, EV_KEY, KEY_PREVIOUSSONG, 1},
+ "cd/prev CDPREV 00000080 00000000"},
+ {{{0,0}, EV_KEY, KEY_PLAYPAUSE, 1},
+ "cd/play CDPLAY 00000080 00000000"},
+ {{{0,0}, EV_KEY, KEY_STOPCD, 1},
+ "cd/stop CDSTOP 00000080 00000000"},
/* additional events divined from the kernel's video.c */
{{{0,0}, EV_KEY, KEY_VIDEO_NEXT, 1},
"video/next NEXT 00000083 00000000"},