You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I saw in the injecting input section of the documentation that the library "accepts only KEY_* events by default". Does this mean I cannot inject touch events (like touching, swiping, etc.), and if I am wrong, how would I go about injecting such an touch event?
The text was updated successfully, but these errors were encountered:
With "by default", I think they mean that when creating a device, they say to support Keyboard events since it's the most common use case. Evdev devices usually specify all the keys they'll ever send beforehand to allow other programs to classify them by. You can simply specify your own events=.
I don't think that such a thing as a "swipe" event exists within evdev. You probably need to fake the swipe by sending the fitting touch events.
You should also consider what type of "touch events" you want to send.
Touchpads usually are relative event (REL_*)
Multitouch (with one or more fingers) usually starts with ABS_MT_. You should also specify the AbsInfo since the touch screen size rarely matches the screen resolution (my example above does it as well). Not all multitouch screns have the same event behaviour.
Drawing tablets / pen input (like a Wacom tablet or anything with an EMR pen). Those usually start with ABS_. They also use some BTN_* events to denote when the pen gets in reach or the "rubber side/tool" is used.
The best thing is probably to look at the emitted events of the device type you want to fake (using evtest). Mutitouch (MT) for example usually increases the ABS_MT_TRACKING_ID and keeps track of fingers by changing the ABS_MT_SLOT before each X, Y coordinate events.
I saw in the injecting input section of the documentation that the library "accepts only KEY_* events by default". Does this mean I cannot inject touch events (like touching, swiping, etc.), and if I am wrong, how would I go about injecting such an touch event?
The text was updated successfully, but these errors were encountered: