Re: Input event for blocking touchpad

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

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@xxxxxxxxxx>
Signed-off-by: Dmitry Torokhov <dtor@xxxxxxx>
---

 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
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux