From: Dmitry Torokhov <dtor_core@ameritech.net>
To: linux-kernel@vger.kernel.org
Cc: Vojtech Pavlik <vojtech@suse.cz>
Subject: [PATCH 2/15] New set of input patches: synaptics middle button support
Date: Wed, 21 Apr 2004 00:51:06 -0500 [thread overview]
Message-ID: <200404210051.08554.dtor_core@ameritech.net> (raw)
In-Reply-To: <200404210049.17139.dtor_core@ameritech.net>
===================================================================
ChangeSet@1.1903, 2004-04-20 22:23:47-05:00, dtor_core@ameritech.net
Input: support Synaptics touchpads that have separate middle button
synaptics.c | 11 +++++++++++
synaptics.h | 2 ++
2 files changed, 13 insertions(+)
===================================================================
diff -Nru a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
--- a/drivers/input/mouse/synaptics.c Tue Apr 20 22:57:07 2004
+++ b/drivers/input/mouse/synaptics.c Tue Apr 20 22:57:07 2004
@@ -184,6 +184,8 @@
if (SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap))
printk(KERN_INFO " -> %d multi-buttons, i.e. besides standard buttons\n",
(int)(SYN_CAP_MULTI_BUTTON_NO(priv->ext_cap)));
+ if (SYN_CAP_MIDDLE_BUTTON(priv->capabilities))
+ printk(KERN_INFO " -> middle button\n");
if (SYN_CAP_FOUR_BUTTON(priv->capabilities))
printk(KERN_INFO " -> four buttons\n");
if (SYN_CAP_MULTIFINGER(priv->capabilities))
@@ -342,6 +344,9 @@
set_bit(BTN_LEFT, dev->keybit);
set_bit(BTN_RIGHT, dev->keybit);
+ if (SYN_CAP_MIDDLE_BUTTON(priv->capabilities))
+ set_bit(BTN_MIDDLE, dev->keybit);
+
if (SYN_CAP_FOUR_BUTTON(priv->capabilities)) {
set_bit(BTN_FORWARD, dev->keybit);
set_bit(BTN_BACK, dev->keybit);
@@ -470,6 +475,9 @@
hw->left = (buf[0] & 0x01) ? 1 : 0;
hw->right = (buf[0] & 0x02) ? 1 : 0;
+ if (SYN_CAP_MIDDLE_BUTTON(priv->capabilities))
+ hw->middle = ((buf[0] ^ buf[3]) & 0x01) ? 1 : 0;
+
if (SYN_CAP_FOUR_BUTTON(priv->capabilities)) {
hw->up = ((buf[0] ^ buf[3]) & 0x01) ? 1 : 0;
hw->down = ((buf[0] ^ buf[3]) & 0x02) ? 1 : 0;
@@ -568,6 +576,9 @@
input_report_key(dev, BTN_LEFT, hw.left);
input_report_key(dev, BTN_RIGHT, hw.right);
+
+ if (SYN_CAP_MIDDLE_BUTTON(priv->capabilities))
+ input_report_key(dev, BTN_MIDDLE, hw.middle);
if (SYN_CAP_FOUR_BUTTON(priv->capabilities)) {
input_report_key(dev, BTN_FORWARD, hw.up);
diff -Nru a/drivers/input/mouse/synaptics.h b/drivers/input/mouse/synaptics.h
--- a/drivers/input/mouse/synaptics.h Tue Apr 20 22:57:07 2004
+++ b/drivers/input/mouse/synaptics.h Tue Apr 20 22:57:07 2004
@@ -44,6 +44,7 @@
/* synaptics capability bits */
#define SYN_CAP_EXTENDED(c) ((c) & (1 << 23))
+#define SYN_CAP_MIDDLE_BUTTON(c) ((c) & (1 << 18))
#define SYN_CAP_PASS_THROUGH(c) ((c) & (1 << 7))
#define SYN_CAP_SLEEP(c) ((c) & (1 << 4))
#define SYN_CAP_FOUR_BUTTON(c) ((c) & (1 << 3))
@@ -88,6 +89,7 @@
int w;
unsigned int left:1;
unsigned int right:1;
+ unsigned int middle:1;
unsigned int up:1;
unsigned int down:1;
unsigned char ext_buttons;
next prev parent reply other threads:[~2004-04-21 6:31 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-21 5:49 [PATCH 0/15] New set of input patches Dmitry Torokhov
2004-04-21 5:50 ` [PATCH 1/15] New set of input patches: synaptics cleanup Dmitry Torokhov
2004-04-21 5:51 ` Dmitry Torokhov [this message]
2004-04-21 5:51 ` [PATCH 3/15] New set of input patches: dont change max proto Dmitry Torokhov
2004-04-21 5:52 ` [PATCH 4/15] New set of input patches: lkkbd whitespace Dmitry Torokhov
2004-04-21 11:39 ` Jan-Benedict Glaw
2004-04-21 12:40 ` [New-PATCH] lkkbd: Current version Jan-Benedict Glaw
2004-04-22 7:27 ` [PATCH 4/15] New set of input patches: lkkbd whitespace Vojtech Pavlik
2004-04-21 5:53 ` [PATCH 5/15] New set of input patches: lkkbd simplify checks Dmitry Torokhov
2004-04-21 11:34 ` Jan-Benedict Glaw
2004-04-21 5:54 ` [PATCH 6/15] New set of input patches: atkbd soften accusation Dmitry Torokhov
2004-04-21 14:13 ` Giuseppe Bilotta
2004-04-21 5:56 ` [PATCH 7/15] New set of input patches: atkbd trailing whitespace Dmitry Torokhov
2004-04-21 5:57 ` [PATCH 8/15] New set of input patches: atkbd - use bitfields Dmitry Torokhov
2004-04-22 7:31 ` Vojtech Pavlik
2004-04-22 7:41 ` Dmitry Torokhov
2004-04-22 7:58 ` Vojtech Pavlik
2004-04-25 6:25 ` Pavel Machek
2004-04-21 5:58 ` [PATCH 9/15] New set of input patches: atkbd timeout complaints Dmitry Torokhov
2004-04-22 7:32 ` Vojtech Pavlik
2004-04-22 7:43 ` Dmitry Torokhov
2004-04-21 6:00 ` [PATCH 10/15] New set of input patches: psmouse rescan on hotplug Dmitry Torokhov
2004-04-21 6:01 ` [PATCH 11/15] New set of input patches: psmouse reconnect after error Dmitry Torokhov
2004-04-21 6:01 ` [PATCH 12/15] New set of input patches: psmouse add protocol_handler Dmitry Torokhov
2004-04-21 6:02 ` [PATCH 13/15] New set of input patches: psmouse sliced commands Dmitry Torokhov
2004-04-21 6:04 ` [PATCH 14/15] New set of input patches: atkbd reconnect probe Dmitry Torokhov
2004-04-21 6:05 ` [PATCH 15/15] New set of input patches: allow disabling psaux Dmitry Torokhov
2004-04-21 12:43 ` [PATCH 0/15] New set of input patches Jan-Benedict Glaw
2004-04-22 6:43 ` [PATCH 16/15] New set of input patches: serio whitespace Dmitry Torokhov
2004-04-22 6:56 ` [PATCH 17/15] New set of input patches: serio open/close optional Dmitry Torokhov
2004-04-22 7:29 ` Dmitry Torokhov
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=200404210051.08554.dtor_core@ameritech.net \
--to=dtor_core@ameritech.net \
--cc=linux-kernel@vger.kernel.org \
--cc=vojtech@suse.cz \
/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