Eeems-Org / oxide

A desktop environment for the reMarkable tablet
https://oxide.eeems.codes
MIT License
243 stars 21 forks source link

Add inject_evdev application #299

Closed Eeems closed 1 year ago

Eeems commented 1 year ago

inject_evdev.zip Minimum build without sentry enabled, and including the required library.

Eeems commented 1 year ago

Example usage: echo -e "EV_ABS ABS_MT_TRACKING_ID 123\nEV_SYN SYN_MT_REPORT\n EV_SYN SYN_REPORT\nEV_ABS ABS_MT_TRACKING_ID -1\nEV_SYN SYN_MT_REPORT\n EV_SYN SYN_REPORT" | inject_evdev event2

Another example would be to create a file named events.txt with the following:

EV_ABS ABS_MT_TRACKING_ID 123
EV_SYN SYN_MT_REPORT
EV_SYN SYN_REPORT
EV_ABS ABS_MT_TRACKING_ID -1
EV_SYN SYN_MT_REPORT
EV_SYN SYN_REPORT

And then run the following: cat events.txt | inject_evdev event2

You can also just run inject_evdev event2 and manually type in the events.

X-Ryl669 commented 1 year ago

Doesn't that duplicate what's done in iago and lamp ? Or is it for testing the event handling code ?

Eeems commented 1 year ago

Doesn't that duplicate what's done in iago and lamp ? Or is it for testing the event handling code ?

Not at all, this allows injecting fake evdev events via any script.

iago is for drawing shapes, so while it does inject pen events, it first has a UI for you to position the shape before drawing. This serves a very specific purpose, which inject_evdev does not.

lamp is just for listening to touch events and running things based on gestures.