Open quazar-omega opened 1 year ago
There is this : https://github.com/ammgws/wshowkeys
Feel free to create a PR.
wshowkeys
Oh I haven't heard of it, I'll try it soon, thanks @rooiratel
@mpsq ok, will do! If the suggestion works well enough I'll mark the functionality as covered
@rooiratel I wasn't able to run it, I tried doing so both through distrobox and got no output at all, then by running the executable produced from within the container from the host system, but it keeps saying
wshowkey needs to be setuid to read input events
although I have run
chmod a+s /path/to/wshowkey
as instructed.
What should I do?
Hi @quazar-omega I haven't tried it myself either! But I'll give it a go on my system and see if I can get it to work.
Ok, I'll wait for your comment then, thank you! In the meantime, I'll open a draft pull request
I just installed and tried it now. It works for me without any issues.
For context I am on Arch Linux and I just installed the AUR package : https://aur.archlinux.org/packages/wshowkeys-git
I'm not sure which distro you use, but the PKGBUILD file should hopefully help you get it working on your system:
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=wshowkeys-git
Hm I see, that is the package I had installed in my Arch container too, I'm on Fedora Kinoite so my system is immutable, that's why I couldn't install it directly on my host.
I'll see if I can build it with a Fedora container, maybe that could make a difference, though to be fair, if it is becoming so hard to install (aside from Arch-based distros) I'm leaning on considering it not really user ready, don't know what the maintainers' stance on that is
Update: I was actually able to find the dependencies I was missing thanks to pkgs.org like so and I repeated the same thing by replacing the word enclosed in parentheses after "pkgconfig" (e.g. pkgconfig(xkbcommon)
in the search field) so I was finally able to complete the build process.
Now the problem (just as before) is that when I run it I don't see any output.
I also tried moving the binary to my host system and running it from there but I keep getting:
$ wshowkeys
wshowkeys needs to be setuid to read input events
Even though I set it as setuid:
sudo chmod a+s .local/bin/wshowkeys
Update: Now I also tried by compiling directly on my host system, but the issue persists anyway, maybe it has to do with some permissions?
I may be interested in working on a project like this that works on both X11 and Wayland without root or any special permissions, after I set up some APIs in the appropriate libraries to get it done.
That would be great, but can it really be done without root?
Yes it can. That's why the InputCapture portal exists.
Oh cool, I'll be looking forward to it then!
Update here! A new (not actually new, but I just didn't know about its existence until it was brought up in a random thread) application is available: https://github.com/AlynxZhou/showmethekey
It needs root access unfortunately, but it's better than nothing until someone succeeds in implementing a key screencaster that makes use of the Input Capture portal mentioned by @orowith2os.
I guess I'll be updating my PR 🎉
As of now it seems there is no application to show the keys being pressed that works on Wayland.
The X11 equivalent would be screenkey