Hi,
Several laptops have keys that are intended to show battery status. In
order to present a consistent view to userspace, it would be nice to
have a standard keycode to map them to. linux/input.h doesn't currently
provide anything appropriate. What's the correct way of allocating
another keycode?
--
Matthew Garrett | [email protected]
On Thursday 23 February 2006 12:53, Matthew Garrett wrote:
> Hi,
>
> Several laptops have keys that are intended to show battery status. In
> order to present a consistent view to userspace, it would be nice to
> have a standard keycode to map them to. linux/input.h doesn't currently
> provide anything appropriate. What's the correct way of allocating
> another keycode?
>
Just post a patch adding it to input.h and we'll discuss... Who is intended
user? What interface is expected to be used (evdev)?
--
Dmitry
On Fri, Feb 24, 2006 at 11:00:58PM -0500, Dmitry Torokhov wrote:
> Just post a patch adding it to input.h and we'll discuss... Who is intended
> user? What interface is expected to be used (evdev)?
Patch included. We have code to pop up battery information in
gnome-power-manager in response to this key being pressed, and evdev is
the current interface for getting the keypress event.
diff --git a/include/linux/input.h b/include/linux/input.h
index 3c58233..1714630 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -344,6 +344,8 @@ struct input_absinfo {
#define KEY_SAVE 234
#define KEY_DOCUMENTS 235
+#define KEY_BATTERY 236
+
#define KEY_UNKNOWN 240
#define BTN_MISC 0x100
--
Matthew Garrett | [email protected]
On Sun, Feb 26, 2006 at 04:07:30PM +0000, Matthew Garrett wrote:
> Patch included. We have code to pop up battery information in
> gnome-power-manager in response to this key being pressed, and evdev is
> the current interface for getting the keypress event.
Hi - any feedback on this?
Thanks,
--
Matthew Garrett | [email protected]
On 3/8/06, Matthew Garrett <[email protected]> wrote:
> On Sun, Feb 26, 2006 at 04:07:30PM +0000, Matthew Garrett wrote:
>
> > Patch included. We have code to pop up battery information in
> > gnome-power-manager in response to this key being pressed, and evdev is
> > the current interface for getting the keypress event.
>
> Hi - any feedback on this?
>
Oh, I am sorry. I will add it to my tree.
--
Dmitry