uInput device with keyboard and mouse capabilities seems stuck
Dear all,
I have been experience an strange problem, I hope maybe you could be able to give some light on it.
I am running a Debian Squeeze distro (6.0), with kernel 2.6.37.6. on a device with a touchscreen.
The touch events are handled through the hid-quanta module. I use the uTouch library to identify the ongoing gestures (the screen can detect a maximum of two fingers simultaneously).
The gestures detected through the uTouch library are converted in mouse/key events and injected back to kernel through the uInput kernel module. This uTouch device can report the 255 keyboard keys, the
left and rigth mouse buttons and absolute axis position.
My problem is that randomly, my application stops to send events through my the uInput device, and it does not respond to any touch gesture. If I query the state of the uInput device, the left button of the mouse (button[1]) appears as down, as if it's been holding down, even if the touchscreen device is idle.
The problem is solved by de-activating and activating the uInput device by means of xinput as well:
xinput set-prop "uinput-device" "Device Enabled" 0
xinput set-prop "uinput-device" "Device Enabled" 1
I have verified that I received events from the hid-quanta module, so it is not a problem of the touchscreen or the hid-quanta module. I have not find any problem in the uTouch library either or in my application (yet).
I have looked around but I haven't found anything related to this problem yet.
I could not find what does internally the 'xinput set-prop "uinput-device" "Device Enabled"' command neither.
If anyone knows which can be a good direction to investigate, it would be greatly appreciate.
Thank you very much,
|