RE: [PATCH 1/2] elantech: Properly differentiate between clickpads and normal touchpads
From: duson <hidden>
Date: 2013-12-10 09:29:35
Hi Hans:
-----Original Message----- From: linux-input-owner@vger.kernel.org
[mailto:linux-input-owner@vger.kernel.org]
On Behalf Of Hans de Goede Sent: Tuesday, December 10, 2013 4:46 PM To: duson; 'Dmitry Torokhov'; 'Benjamin Tissoires' Cc: 'linux-input'; 'Peter Hutterer'; '黃世鵬' Subject: Re: [PATCH 1/2] elantech: Properly differentiate between
clickpads and
normal touchpads Hi Duson, On 12/10/2013 09:35 AM, duson wrote: <snip>quoted
quoted
We should not advertise events that device does not generate. This should help userspace to decide if emulation is needed or not. Input core will drop events that are not set up as valid for device, so if we clear BTN_RIGHT there it should all work.Actually, our touchpad for PS2 protocol implements the left and right
click
quoted
function, even thought, it is a click-pad. And the flag for left/right
click
quoted
information is recorded in the first byte of the packet (when doing sync method). Byte0 Bit 0 --> for left click flag Byte0 Bit1 --> for right click flag When user presses the left-bottom area of the click-pad, only the left
click
quoted
flag will be set to "1". On the other hand, pressing the right-bottom
area
quoted
of the click-pad, only the right click flag will be set to "1". So, I think this is the cause of the BTN_RIGHT need to be set.Are you sure? All info we have so far indicates that the right button
needs
to be emulated in software in the clickpad case, ie a while back this commit was added:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drive rs/input/mous
e/elantech.c?id=e3dde4fba94e0ba5e1fd79ea9e5389eea1f0cfec To fix the right button not working, this also removes the checking for bit 1 / reporting of BTN_RIGHT events, so if the right click area would actually send right clicks I would expect the above commit to have broken right clicking for tons of users, and we have no bug reports about this (my patch fixes the right button being broken in the non clickpad case). Note that the Linux driver uses the touchpad in absolute mode, not in relative / ps/2 mouse emulation mode. Could it be that the handling of the right button emulation for clickpads is only done in the firmware in relative mode ? Or maybe it is done in firmware for hardware v3 clickpads, but not for v4 clickpads ?
Sorry, this is my mistake. I had confirmed our firmware engineer again. The correct answer is "When using click-pad in absolute mode only the left click function work." So, both the left/right click function is enabled when using normal smart-pad (non-clickpad) or clickpad in relative mode. Thanks, Duson -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html