From: Daniel van Vugt <vanvugt@gmail.com>
To: linux-input@vger.kernel.org
Subject: [PATCH v1 1/1] hid-magicmouse: Magic Trackpad has 1 button, not 2
Date: Thu, 13 Oct 2011 18:05:12 +0800 [thread overview]
Message-ID: <4E96B7D8.3030005@gmail.com> (raw)
hid-magicmouse was advertising the Apple Magic Trackpad as having 2
buttons (left and right) when it actually only has 1 button.
Advertising multiple buttons in turn makes the xorg synaptics code
disable all button 2 and 3 emulation (using multi-finger clicks). So
xorg users don't get working right/middle-click emulation out of the box.
This patch makes hid-magicmouse correctly only report one real button
for Magic Trackpad, which in turn makes xorg enable multi-finger click
support to emulate right/middle buttons.
[http://launchpad.net/bugs/862094]
Signed-off-by: Daniel van Vugt <vanvugt@gmail.com>
---
drivers/hid/hid-magicmouse.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
index f0fbd7b..12200e6 100644
--- a/drivers/hid/hid-magicmouse.c
+++ b/drivers/hid/hid-magicmouse.c
@@ -405,6 +405,8 @@ static void magicmouse_setup_input(struct input_dev
*input, struct hid_device *h
__set_bit(REL_HWHEEL, input->relbit);
}
} else { /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD */
+ __clear_bit(BTN_RIGHT, input->keybit);
+ __clear_bit(BTN_MIDDLE, input->keybit);
__set_bit(BTN_MOUSE, input->keybit);
__set_bit(BTN_TOOL_FINGER, input->keybit);
__set_bit(BTN_TOOL_DOUBLETAP, input->keybit);
next reply other threads:[~2011-10-13 10:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-13 10:05 Daniel van Vugt [this message]
2011-10-13 16:28 ` [PATCH v1 1/1] hid-magicmouse: Magic Trackpad has 1 button, not 2 Chase Douglas
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=4E96B7D8.3030005@gmail.com \
--to=vanvugt@gmail.com \
--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 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.