-
-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wayland support for keyboard emulation #32
Comments
This comment has been minimized.
This comment has been minimized.
XWayland is always running as a separate (compositor) process in these wayland sessions and it's used automatically. As I see it uses these to simulate events:
So there are two questions that come to my mind:
As I see we have My question was which one takes precedence. I tried Enabling uinput would be the key here, guessing from this SO. |
Oh, let's see this with debug log level.
There we go! Maybe by running as a native wayland app this could work. Can you somehow compile with the QTWayland module? |
With |
Unless they tell me some better solution in IRC, only a workaround works like described here. ( |
Just pasting the responses from IRC:
libei is pretty much WIP though promising - not relevant now. For now to address this, I'll create a section in the README describing some workarounds. ( Please if you can, look into compiling with QTWayland to make the app Wayland-compatible, and let's also look into whether making |
I think we will have to use PolicyKit to somehow gain access to input group. In case if this will appear to be too messy I will check other solutions. I will investigate it deeper soon. |
@pktiuk maybe this will help? flatpak/flatpak#4083 |
@soredake I think the best (and the simplest) solution would be creating a new dedicated group having access to uinput and changing uid of executable. I think we should create postinstallation script dealing with it. We could also consider making this script optional and offer running it only when Wayland is detected. Related topics: Or maybe creating some udev rule would help |
It seems that for classic linux packages we could use setuid, to make it work we should only change bit of executable, but I don't know how it would work with flatpak. |
I just tried on Fedora 34 with flatpak, the program starts and detects the joypad, but then doesn't write any input. Installing the antimicrox from the RPM repos and then running |
There is already prepared file adding new udev rule allowing users writing to uinput without sudo https://github.com/AntiMicroX/antimicrox/blob/master/other/40-uinput.rules
But this config file is not utilized anywhere. To work properly, this file should be placed at |
I don't know whether this solution will work with flatpak flatpak/flatpak#961 It would be good to check it to be sure. |
Dunno how helpful it is https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/110 |
Is your feature request related to a problem? Please describe.
Should support KB emulation in wayland.
Describe the solution you'd like
Dunno yet.
Additional context
GUI works fine, tested in a Wayland Fedora VM.
Got this in a PM on reddit:
EDIT:
It can be done via switching from xtest to uinput, but uinput requires either root or aditional udev rule
TODO list:
The text was updated successfully, but these errors were encountered: