H-M-H/Weylus

Stylus and touch support on windows

Open

#17 geöffnet am 15. Juni 2020

Auf GitHub ansehen
 (36 Kommentare) (11 Reaktionen) (0 zugewiesene Personen)Rust (166 Forks)batch import
enhancementhelp wanted

Repository-Metriken

Stars
 (4.546 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Right now only the mouse can be controlled, things like pressure or touch events are not handled. I do not run windows myself and thus will most likely not implement this, but if someone else is up to the task here is what needs to be done:

Implement the InputDevice trait: https://github.com/H-M-H/Weylus/blob/master/src/input/device.rs, send_event is called on every PointerEvent sent from the browser. The PointerEvent type is defined in https://github.com/H-M-H/Weylus/blob/master/src/protocol.rs. x and y coordinates of the events are normalized to a range between 0 and 1, have a look at https://github.com/H-M-H/Weylus/blob/master/ts/lib.ts.

Once a struct that implements this trait is done (should be in its own file in https://github.com/H-M-H/Weylus/blob/master/src/input/), it has to be instantiated in https://github.com/H-M-H/Weylus/blob/master/src/websocket.rs setup.

Probably useful:

Contributor Guide