* Input event for blocking touchpad
@ 2010-11-26 21:10 Thadeu Lima de Souza Cascardo
2010-11-28 8:07 ` Dmitry Torokhov
2010-11-30 1:34 ` Zhang Rui
0 siblings, 2 replies; 5+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2010-11-26 21:10 UTC (permalink / raw)
To: linux-input; +Cc: linux-acpi
[-- Attachment #1: Type: text/plain, Size: 478 bytes --]
Hello,
I have a notebook with an ACPI system that notifies about the pressing
of the key for blocking touchpad. However, it does not notify it by
itself. I was considering sending the event to userspace and let it does
the blocking.
Since other keys are also notified by this same ACPI object, it's even
more natural that I use an input device to send this to userspace.
The problem is: there seems to be no event to represent this. Any
suggestions?
Best regards,
Cascardo.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Input event for blocking touchpad
2010-11-26 21:10 Input event for blocking touchpad Thadeu Lima de Souza Cascardo
@ 2010-11-28 8:07 ` Dmitry Torokhov
2010-11-28 14:38 ` Bastien Nocera
2010-11-30 1:34 ` Zhang Rui
1 sibling, 1 reply; 5+ messages in thread
From: Dmitry Torokhov @ 2010-11-28 8:07 UTC (permalink / raw)
To: Thadeu Lima de Souza Cascardo; +Cc: linux-input, linux-acpi
On Fri, Nov 26, 2010 at 07:10:57PM -0200, Thadeu Lima de Souza Cascardo wrote:
> Hello,
>
> I have a notebook with an ACPI system that notifies about the pressing
> of the key for blocking touchpad. However, it does not notify it by
> itself. I was considering sending the event to userspace and let it does
> the blocking.
>
> Since other keys are also notified by this same ACPI object, it's even
> more natural that I use an input device to send this to userspace.
>
> The problem is: there seems to be no event to represent this. Any
> suggestions?
>
I have the patch below from Bastien that I will be queueing shortly.
Thanks.
--
Dmitry
Input: add keycodes for touchpad on/off keys
From: Bastien Nocera <hadess@hadess.net>
Some laptops will have a "touchpad toggle" soft button, which expects
user-space to turn off the touchpad themselves, some other devices will
do this in hardware, but send key events telling us that the touchpad
has been turned off/on.
KEY_TOUCHPAD_ON/KEY_TOUCHPAD_OFF will be used by user-space to show a
popup with the status of the touchpad.
Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
include/linux/input.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/include/linux/input.h b/include/linux/input.h
index 6c3c986..a8af21d 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -643,6 +643,10 @@ struct input_keymap_entry {
#define KEY_CAMERA_FOCUS 0x210
#define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */
+#define KEY_TOUCHPAD_TOGGLE 0x212 /* Request switch touchpad on or off */
+#define KEY_TOUCHPAD_ON 0x213
+#define KEY_TOUCHPAD_OFF 0x214
+
#define BTN_TRIGGER_HAPPY 0x2c0
#define BTN_TRIGGER_HAPPY1 0x2c0
#define BTN_TRIGGER_HAPPY2 0x2c1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: Input event for blocking touchpad
2010-11-28 8:07 ` Dmitry Torokhov
@ 2010-11-28 14:38 ` Bastien Nocera
0 siblings, 0 replies; 5+ messages in thread
From: Bastien Nocera @ 2010-11-28 14:38 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Thadeu Lima de Souza Cascardo, linux-input, linux-acpi
On Sun, 2010-11-28 at 00:07 -0800, Dmitry Torokhov wrote:
> On Fri, Nov 26, 2010 at 07:10:57PM -0200, Thadeu Lima de Souza Cascardo wrote:
> > Hello,
> >
> > I have a notebook with an ACPI system that notifies about the pressing
> > of the key for blocking touchpad. However, it does not notify it by
> > itself. I was considering sending the event to userspace and let it does
> > the blocking.
> >
> > Since other keys are also notified by this same ACPI object, it's even
> > more natural that I use an input device to send this to userspace.
> >
> > The problem is: there seems to be no event to represent this. Any
> > suggestions?
> >
>
> I have the patch below from Bastien that I will be queueing shortly.
Note that KEY_TOUCHPAD_{ON,OFF} are for when:
1) Your touchpad disables in hardware
2) You can know for certain the status of the device
You'll need to use KEY_TOUCHPAD_TOGGLE in your patch (and make changes
to udev's keyboard remap scripts to map KEY_TOUCHPAD_TOGGLE to F21 until
X can get access to those keycodes.
Cheers
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Input event for blocking touchpad
2010-11-26 21:10 Input event for blocking touchpad Thadeu Lima de Souza Cascardo
2010-11-28 8:07 ` Dmitry Torokhov
@ 2010-11-30 1:34 ` Zhang Rui
2010-11-30 1:56 ` Thadeu Lima de Souza Cascardo
1 sibling, 1 reply; 5+ messages in thread
From: Zhang Rui @ 2010-11-30 1:34 UTC (permalink / raw)
To: Thadeu Lima de Souza Cascardo
Cc: linux-input@vger.kernel.org, linux-acpi@vger.kernel.org
On Sat, 2010-11-27 at 05:10 +0800, Thadeu Lima de Souza Cascardo wrote:
> Hello,
>
> I have a notebook with an ACPI system that notifies about the pressing
> of the key for blocking touchpad. However, it does not notify it by
> itself. I was considering sending the event to userspace and let it does
> the blocking.
>
how do you know the event is sent via ACPI?
please try "cat /proc/interrupts > interrupt-1;
grep . /sys/firmware/acpi/interrupts/* > gpe-1; sleep 5;
cat /proc/interrupts > interrupt-2;
grep . /sys/firmware/acpi/interrupts/* > gpe-2", and press the block key
during the 5 seconds sleep.
Then please attach the 4 files here to see if there are ACPI interrupts
generated by the key pressing.
thanks,
rui
> Since other keys are also notified by this same ACPI object, it's even
> more natural that I use an input device to send this to userspace.
>
> The problem is: there seems to be no event to represent this. Any
> suggestions?
>
> Best regards,
> Cascardo.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Input event for blocking touchpad
2010-11-30 1:34 ` Zhang Rui
@ 2010-11-30 1:56 ` Thadeu Lima de Souza Cascardo
0 siblings, 0 replies; 5+ messages in thread
From: Thadeu Lima de Souza Cascardo @ 2010-11-30 1:56 UTC (permalink / raw)
To: Zhang Rui
Cc: linux-input@vger.kernel.org, linux-acpi@vger.kernel.org,
platform-driver-x86
[-- Attachment #1: Type: text/plain, Size: 2001 bytes --]
On Tue, Nov 30, 2010 at 09:34:13AM +0800, Zhang Rui wrote:
> On Sat, 2010-11-27 at 05:10 +0800, Thadeu Lima de Souza Cascardo wrote:
> > Hello,
> >
> > I have a notebook with an ACPI system that notifies about the pressing
> > of the key for blocking touchpad. However, it does not notify it by
> > itself. I was considering sending the event to userspace and let it does
> > the blocking.
> >
> how do you know the event is sent via ACPI?
>
> please try "cat /proc/interrupts > interrupt-1;
> grep . /sys/firmware/acpi/interrupts/* > gpe-1; sleep 5;
> cat /proc/interrupts > interrupt-2;
> grep . /sys/firmware/acpi/interrupts/* > gpe-2", and press the block key
> during the 5 seconds sleep.
> Then please attach the 4 files here to see if there are ACPI interrupts
> generated by the key pressing.
>
> thanks,
> rui
I know because I've already done some investigation and have even
written a driver for it. It's WMI to be more precise. After calling a
WMI method, it does start notification through the PNP0C14 object, using
the notify_id of a GUID. Then, I can get the key calling a query block
for a third GUID. I get values for all the keys whose functions were
missing.
I am about to send the driver soon. It requires the fix for WMI that
I've sent yesterday to work at all, since the GUIDs I use were being
wrongly considerated as duplicates.
Thanks for the tip, though. I'll be sure to use it to lookup the source
for key presses next time. In fact, I did end up looking at *gpe* at
/sys/ while doing this investigation. Now, I'm sure that's one of the
first places to look up while searching for ACPI notifications.
Thanks Rui.
Regards,
Cascardo.
> > Since other keys are also notified by this same ACPI object, it's even
> > more natural that I use an input device to send this to userspace.
> >
> > The problem is: there seems to be no event to represent this. Any
> > suggestions?
> >
> > Best regards,
> > Cascardo.
>
>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-11-30 1:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-26 21:10 Input event for blocking touchpad Thadeu Lima de Souza Cascardo
2010-11-28 8:07 ` Dmitry Torokhov
2010-11-28 14:38 ` Bastien Nocera
2010-11-30 1:34 ` Zhang Rui
2010-11-30 1:56 ` Thadeu Lima de Souza Cascardo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).