Keys are now released when
- A client disconnects and still has pressed keys
- A client disconnects through CTLR+ALT+SHIFT+WIN
- Lan Mouse terminates with keys still being pressed through a remote client
This is also fixes an issue caused by KDE's implementation of the remote desktop portal backend:
Keys are not correctly released when a remote desktop session is closed while keys are still pressed,
causing them to be permanently stuck until kwin is restarted.
This workaround remembers all pressed keys and releases them when lan-mouse exits or a device disconnects.
closes#15
RELEASE_MODIFIERS are now handled server side.
A client exited through CTRL+ALT+SHIFT+SUPER could sometimes not be entered again when the client
did not send a Modifiers (0) event.
Such a client would always respond with Modifiers (RELEASE_MODIFIERS) and immediately cause the sender to
exit again.
To prevent this, a modifier event with all modifiers released is now sent instead when the release modifiers are detected.
Instead of relying on release events not getting lost, every event now signals the opponent
to release its pointer grab.
There is one case that requires a Leave event:
Consider a Sending client A and receiving Client B.
If B enters the dead-zone of client A, it will send an enter event towards A but before
A receives the Release event, it may still send additional events towards B that should not cause
B to immediately revert to Receiving state again.
Therefore B puts itself into AwaitingLeave state until it receives a Leave event coming from A.
A responds to the Enter event coming from B with a leave event, to signify that it will no longer
send any events and releases it's pointer.
To guard against packet loss of the leave events, B sends additional enter events while it is in AwaitingLeave
mode until it receives a Leave event at some point.
This is still not resilient against possible packet reordering in UDP but in the (rare) case where a leave event arrives before some other event coming from A, the user would simply need to move the pointer into the dead-zone again.
When received motion events lead to entering the dead zone,
we set the state to sending but there may still be motion
events on the way so we must ignore those.
* Added example .desktop file.
* remove Path (not required anymore)
* remove "Test" from name
* add German name
* Update description to match GitHub description
---------
Co-authored-by: Ferdinand Schober <ferdinandschober20@gmail.com>