galaktor / gostwriter

A virtual keyboard for linux, which makes use of /dev/uinput to inject key events.
GNU General Public License v3.0
24 stars 7 forks source link

Add mouse-movement events #8

Open idupree opened 8 years ago

idupree commented 8 years ago

Currently you can synthesize mouse-clicks in the same way as if a mouse-button were a key (as of https://github.com/galaktor/gostwriter/pull/7 ; an example code name is key.CODE_BTN_LEFT).

We would like be able to create mouse movement too. This is example C code using uinput to move the mouse: http://git.nosuchfile.org/?p=uinput-sample.git;a=blob_plain;f=uinput-sample.c;hb=HEAD as linked on http://thiemonge.org/getting-started-with-uinput

I don't have quite a good enough sense of the gostwriter code organization yet. Where do you think is the best way to add another uinput event type? For event types, we currently have EV_KEY and mouse-movement would be EV_REL.