Re: [PATCH 1/2] elantech: Properly differentiate between clickpads and normal touchpads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Duson,

On 12/10/2013 09:35 AM, duson wrote:

<snip>

>> 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
> function, even thought, it is a click-pad. And the flag for left/right click
> 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
> flag will be set to "1". On the other hand, pressing the right-bottom area
> 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/drivers/input/mouse/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 ?

Thanks & Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux