handling BTN_TOUCH in evdev driver

Matthew Garrett mjg59 at srcf.ucam.org
Tue Sep 23 00:43:39 PDT 2008


On Tue, Sep 23, 2008 at 09:18:02AM +0200, Søren Hauberg wrote:

> I guess that also depends on the kernel. The 'usbtouchscreen'  kernel
> module only sends BTN_TOUCH, but I don't know about other modules in
> the kernel. Anyway, I have two goals, 1) get a short term solution,
> that'll work right now, and 2) get a long term solution that'll reduce
> the amount of patches we have to maintain in the company. As the short
> term solution, I've changed 'usbtouchscreen' to send BTN_LEFT instead
> of BTN_TOUCH, and this works perfectly fine for me. So, for me,
> changing 'evdev' to treat BTN_TOUCH like BTN_LEFT would be wonderful.
> I don't know about other touchscreens, though...

BTN_TOUCH isn't just used for touchscreens. For example, touchpads send 
it to indicate finger position. It's purely to indicate that an input 
event has been received at that location - treating it as BTN_LEFT by 
default would break existing use cases. It sounds like changing 
usbtouchscreen to send both events (at least optionally) would be more 
reasonable, but you'd probably want to discuss that with upstream.

-- 
Matthew Garrett | mjg59 at srcf.ucam.org



More information about the xorg mailing list