Filtering an entire sieries events enclosed by a SYN_REPORT

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

 



Hi, 

Im writing a driver for buttons permanently located on touchscreen surfaces outside of the main display area sutch as seen on most android devices designed for android <2.3 (google an image of a motorola atrix 4g for an example). This works by attaching to a input touchscreen device and sending a EV_KEY event if a touch lands on a button by matching simultaneous ABS_X ABS_Y and BTN_TOUCHSCREEN events to an arbitrarily defind map of rectangels with assigned keycodes, the WIP module can be examined here: https://github.com/IMbackK/droid4-linux/blob/virtual-buttons/drivers/input/misc/touchscreen-buttons.c

I would also like to filter the events which land on a button, so that userspace dose not react to touch events on these buttons. However an input_handler filter handler is not sufficant for this purpose beacause i have no way of knowing if a touch event belongs to a defind button until the touchsreen driver has sent SYN_REPORT. I have tried to filter all events, while saving them and then reemmiting them by calling input_event() on the input_device of the touchscreen driver, this however crashes the ts driver. This also seams like a very hacky solution even if it where to work.

1. Is there some method to filter an entire sieries events enclosed by a SYN_REPORT?
2. Is there a good way to inject events to a input_device owned by another dirver?
3. Is there any other recommended method to satisfy the above requierments?

-- 
Dev Null



[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