[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220817105013.28036-1-blur.3rd@gmail.com>
Date: Wed, 17 Aug 2022 17:50:13 +0700
From: Supasak Sutha <blur.3rd@...il.com>
To: unlisted-recipients:; (no To-header on input)
Cc: blur.3rd@...il.com, Jiri Kosina <jikos@...nel.org>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] HID: magicmouse: Add parameter to be able to adjust middle button position.
Apparently the driver fixed the offset of middle button to [-350, +350].
Which separated the area to 3 equally space for 3 buttons.
Lead to a lot of mis-clicking as the magicmouse has no real button.
Users should be able to adjust the buttons to suite their fingers.
This patch add parameters to adjust theses offsets,
while keeping the default values to [-350, +350].
Signed-off-by: Supasak Sutha <blur.3rd@...il.com>
---
drivers/hid/hid-magicmouse.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
index 664a624a363d..9709085647fb 100644
--- a/drivers/hid/hid-magicmouse.c
+++ b/drivers/hid/hid-magicmouse.c
@@ -25,7 +25,12 @@ module_param(emulate_3button, bool, 0644);
MODULE_PARM_DESC(emulate_3button, "Emulate a middle button");
static int middle_button_start = -350;
+module_param(middle_button_start, int, 0644);
+MODULE_PARM_DESC(middle_button_start, "Middle button beginning offset");
+
static int middle_button_stop = +350;
+module_param(middle_button_stop, int, 0644);
+MODULE_PARM_DESC(middle_button_stop, "Middle button end offset");
static bool emulate_scroll_wheel = true;
module_param(emulate_scroll_wheel, bool, 0644);
--
2.37.1
Powered by blists - more mailing lists