这是indexloc提供的服务,不要输入任何密码
Skip to content

linux: keys get simulated twice if multiple protocols are available #464

@pentamassiv

Description

@pentamassiv

Right now enigo supports three protocols (libei, Wayland, X11) and tries simulating input with all three. If the compositor supports multiple protocols, the input gets simulated twice. An example for this is Gnome (mutter 48.4). It understands libei and X11.

I could change the code to not retry simulating input after a protocol was successful, but I remember intentionally retrying. I can't remember in which cases exactly, but with some combination of compositor, compositor version and used protocols the input was only simulated in Wayland applications if the X11 protocol was not used and only was simulated in X11 applications if only X11 was used. Unfortunately I cannot remember the details anymore :(

If my memory is true, this is quite the pickle. Either way sometimes the behavior would be broken. Debian derivates often ship old versions for years, so a good number of users would run into issues because of this :/

The only way to fix it for everyone would be to find out the exact combinations where this issue exists and then detect them and retry in these cases. In the future this hacky solution could then be removed

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions