Input event for blocking touchpad
Subsystems (4)
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.
Dmitry Torokhov
maintainerQuoted 7 lines · Thadeu Lima de Souza Cascardo
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.
Quoted 6 lines
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.
Signature · 21 lines
Dmitry Input: add keycodes for touchpad on/off keys From: Bastien Nocera <[email protected]> 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 <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]> --- include/linux/input.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
include/linux/input.h +4 -0
@@ -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
Quoted 8 lines · Dmitry Torokhov
Quoted 7 lines · Thadeu Lima de Souza Cascardo
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.
Quoted 8 lines
Quoted 6 lines
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
Quoted 7 lines · Thadeu Lima de Souza Cascardo
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
Quoted 8 lines
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.
Quoted 18 lines · Zhang Rui
Quoted 7 lines · Thadeu Lima de Souza Cascardo
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.
Quoted 2 lines
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.
Quoted 10 lines
Quoted 8 lines
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.