5 Sep 03:18
[PATCH 2/2] input: mousedev: Emulate right and middle buttons for single-button touchpads
From: Henrik Rydberg <rydberg <at> euromail.se>
Subject: [PATCH 2/2] input: mousedev: Emulate right and middle buttons for single-button touchpads
Newsgroups: gmane.linux.kernel.input, gmane.linux.kernel
Date: 2008-09-05 01:19:56 GMT
Subject: [PATCH 2/2] input: mousedev: Emulate right and middle buttons for single-button touchpads
Newsgroups: gmane.linux.kernel.input, gmane.linux.kernel
Date: 2008-09-05 01:19:56 GMT
On most linux-based systems, the right and middle buttons are used extensively. On computers lacking either of those buttons, such as the Apple Macbooks, emulation is needed. This patch adds emulation of the missing buttons via two-fingers-and-click and three-(Continue reading)fingers- and-click operations, which has recently become standard, both in MacOS and in the Xorg synaptics driver. Signed-off-by: Henrik Rydberg <rydberg <at> euromail.se> --- drivers/input/mousedev.c | 31 +++++++++++++++++++++++++++++++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c index 27e1d73..a1e929f 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c @@ -53,6 +53,14 @@ static unsigned tap_move = 20; module_param(tap_move, uint, 0644); MODULE_PARM_DESC(tap_move, "Tap distance for touchpads in absolute mode (res)"); +static unsigned two_finger_code = BTN_RIGHT; +module_param(two_finger_code, uint, 0644); +MODULE_PARM_DESC(two_finger_code, "Button code of two-finger click"); + +static unsigned three_finger_code = BTN_MIDDLE; +module_param(three_finger_code, uint, 0644); +MODULE_PARM_DESC(three_finger_code, "Button code of three-finger click"); + struct mousedev_hw_data { int dx, dy, dz;
RSS Feed