From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Cc: linux-input@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: Input event for blocking touchpad
Date: Sun, 28 Nov 2010 00:07:43 -0800 [thread overview]
Message-ID: <20101128080743.GE14499@core.coreip.homeip.net> (raw)
In-Reply-To: <20101126211056.GD3819@barata.holoscopio.com>
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
next prev parent reply other threads:[~2010-11-28 9:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-26 21:10 Input event for blocking touchpad Thadeu Lima de Souza Cascardo
2010-11-28 8:07 ` Dmitry Torokhov [this message]
2010-11-28 14:38 ` Bastien Nocera
2010-11-30 1:34 ` Zhang Rui
2010-11-30 1:56 ` Thadeu Lima de Souza Cascardo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101128080743.GE14499@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=cascardo@holoscopio.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).