From: "Németh Márton" <nm127@freemail.hu>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@atrey.karlin.mff.cuni.cz, linux-kernel@vger.kernel.org
Subject: [PATCH] input: map BTN_FORWARD to button 2 in mousedev
Date: Sun, 05 Nov 2006 12:40:44 +0100 [thread overview]
Message-ID: <454DCDBC.7060201@freemail.hu> (raw)
From: Márton Németh <nm127@freemail.hu>
In mousedev the BTN_LEFT and BTN_FORWARD were mapped to mouse button 0, causing
that the user space program cannot distinguish between them through /dev/input/mice.
The BTN_FORWARD is currently used in the synaptics.c, logips2pp.c and in alps.c. All
mice have BTN_LEFT, but not all have BTN_MIDDLE (e.g. Clevo D410J laptop). Mapping
BTN_FORWARD to mouse button 2 makes the BTN_FORWARD button useful on the mentioned
laptop.
Signed-off-by: Márton Németh <nm127@freemail.hu>
---
The Clevo D410J laptop has "AlpsPS/2 ALPS GlidePoint" touchpad having the following
physical layout:
+-------------------+ +-------------+ +-------------------+
| | | BTN_FORWARD | | |
| BTN_LEFT | +-------------+ | BTN_RIGHT |
| | +-------------+ | |
| | | BTN_BACK | | |
+-------------------+ +-------------+ +-------------------+
This model does not have any BTN_MIDDLE, but the BTN_FORWARD could be used instead.
The following table summarizes the map changes:
Button name | Mapping in 2.6.19-rc3 | The changed mapping
-------------+-----------------------+---------------------
BTN_LEFT | 0 | 0
BTN_RIGHT | 1 | 1
BTN_FORWARD | 0 | 2
BTN_BACK | 3 | 3
--- linux-2.6.19-rc4/drivers/input/mousedev.c.orig 2006-10-31 04:37:36.000000000 +0100
+++ linux-2.6.19-rc4/drivers/input/mousedev.c 2006-11-05 02:34:56.000000000 +0100
@@ -196,12 +196,12 @@ static void mousedev_key_event(struct mo
switch (code) {
case BTN_TOUCH:
case BTN_0:
- case BTN_FORWARD:
case BTN_LEFT: index = 0; break;
case BTN_STYLUS:
case BTN_1:
case BTN_RIGHT: index = 1; break;
case BTN_2:
+ case BTN_FORWARD:
case BTN_STYLUS2:
case BTN_MIDDLE: index = 2; break;
case BTN_3:
next reply other threads:[~2006-11-05 11:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-05 11:40 Németh Márton [this message]
2006-11-06 22:48 ` [PATCH] input: map BTN_FORWARD to button 2 in mousedev Dmitry Torokhov
2006-11-07 8:15 ` Németh Márton
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=454DCDBC.7060201@freemail.hu \
--to=nm127@freemail.hu \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@atrey.karlin.mff.cuni.cz \
--cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.