public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] input: A few new KEY_xxx definitions
@ 2006-08-08  0:09 Lennart Poettering
  2006-08-08  2:19 ` Dmitry Torokhov
  0 siblings, 1 reply; 4+ messages in thread
From: Lennart Poettering @ 2006-08-08  0:09 UTC (permalink / raw)
  To: dtor_core; +Cc: linux-kernel

From: Lennart Poettering <mzxreary@0pointer.de>

The attached patch adds four new KEY_xxx definitions to linux/input.h.

KEY_BLUETOOTH, KEY_WLAN:

    Some laptops have seperate "rfkill"
    buttons for disabling/enabling Bluetooth and WLAN. 

KEY_POWERPLUG, KEY_POWERUNPLUG:

    Some laptops generate a fake key event when the power cord is
    plugged or unplugged. (Notably MSI laptops, such as S270)

Applies to all recent 2.6 kernels.
             
Please merge,
       Lennart

Signed-off-by: Lennart Poettering <mzxreary@0pointer.de>
---

--- include/linux/input.h.orig	2006-08-08 01:25:52.000000000 +0200
+++ include/linux/input.h	2006-08-08 01:43:13.000000000 +0200
@@ -347,8 +347,14 @@ struct input_absinfo {
 
 #define KEY_BATTERY		236
 
+#define KEY_BLUETOOTH		237
+#define KEY_WLAN		238
+
 #define KEY_UNKNOWN		240
 
+#define KEY_POWERPLUG		239
+#define KEY_POWERUNPLUG		241
+
 #define BTN_MISC		0x100
 #define BTN_0			0x100
 #define BTN_1			0x101

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] input: A few new KEY_xxx definitions
  2006-08-08  0:09 [PATCH] input: A few new KEY_xxx definitions Lennart Poettering
@ 2006-08-08  2:19 ` Dmitry Torokhov
  2006-08-08 10:07   ` Lennart Poettering
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Torokhov @ 2006-08-08  2:19 UTC (permalink / raw)
  To: Lennart Poettering; +Cc: linux-kernel

On Monday 07 August 2006 20:09, Lennart Poettering wrote:
> From: Lennart Poettering <mzxreary@0pointer.de>
> 
> The attached patch adds four new KEY_xxx definitions to linux/input.h.
> 
> KEY_BLUETOOTH, KEY_WLAN:
> 
>     Some laptops have seperate "rfkill"
>     buttons for disabling/enabling Bluetooth and WLAN. 
> 
> KEY_POWERPLUG, KEY_POWERUNPLUG:
> 
>     Some laptops generate a fake key event when the power cord is
>     plugged or unplugged. (Notably MSI laptops, such as S270)
> 

How do these events get delivered? Are you saying that atkbd reports
key presses when pulling out AC cord?

-- 
Dmitry

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] input: A few new KEY_xxx definitions
  2006-08-08  2:19 ` Dmitry Torokhov
@ 2006-08-08 10:07   ` Lennart Poettering
  2006-09-20 13:22     ` Dmitry Torokhov
  0 siblings, 1 reply; 4+ messages in thread
From: Lennart Poettering @ 2006-08-08 10:07 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-kernel

On Mon, 07.08.06 22:19, Dmitry Torokhov (dtor@insightbb.com) wrote:

> > KEY_POWERPLUG, KEY_POWERUNPLUG:
> > 
> >     Some laptops generate a fake key event when the power cord is
> >     plugged or unplugged. (Notably MSI laptops, such as S270)
> > 
> 
> How do these events get delivered? Are you saying that atkbd reports
> key presses when pulling out AC cord?

Yes, exactly.

Lennart

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] input: A few new KEY_xxx definitions
  2006-08-08 10:07   ` Lennart Poettering
@ 2006-09-20 13:22     ` Dmitry Torokhov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2006-09-20 13:22 UTC (permalink / raw)
  To: Lennart Poettering; +Cc: linux-kernel

On 8/8/06, Lennart Poettering <mzxreary@0pointer.de> wrote:
> On Mon, 07.08.06 22:19, Dmitry Torokhov (dtor@insightbb.com) wrote:
>
> > > KEY_POWERPLUG, KEY_POWERUNPLUG:
> > >
> > >     Some laptops generate a fake key event when the power cord is
> > >     plugged or unplugged. (Notably MSI laptops, such as S270)
> > >
> >
> > How do these events get delivered? Are you saying that atkbd reports
> > key presses when pulling out AC cord?
>
> Yes, exactly.
>

Lennart,

I applied part of the patch defining KEY_BLUETOOTH and KEY_WLAN, but I
did not apply KEY_POWER[UN]PLUG. I feel that these should not be
defined as KEY_* events but (if we decide that they should be reported
through input layer) as EV_PWR events.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-09-20 13:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-08  0:09 [PATCH] input: A few new KEY_xxx definitions Lennart Poettering
2006-08-08  2:19 ` Dmitry Torokhov
2006-08-08 10:07   ` Lennart Poettering
2006-09-20 13:22     ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox