Skip to content
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

Ability to screencast keys #184

Open
quazar-omega opened this issue May 16, 2023 · 16 comments
Open

Ability to screencast keys #184

quazar-omega opened this issue May 16, 2023 · 16 comments

Comments

@quazar-omega
Copy link

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

@rooiratel
Copy link
Contributor

There is this : https://github.com/ammgws/wshowkeys

@mpsq
Copy link
Owner

mpsq commented May 17, 2023

Feel free to create a PR.

@quazar-omega
Copy link
Author

wshowkeys

Oh I haven't heard of it, I'll try it soon, thanks @rooiratel

@quazar-omega
Copy link
Author

@mpsq ok, will do! If the suggestion works well enough I'll mark the functionality as covered

@quazar-omega
Copy link
Author

quazar-omega commented May 17, 2023

@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?

@rooiratel
Copy link
Contributor

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.

@quazar-omega
Copy link
Author

Ok, I'll wait for your comment then, thank you!
In the meantime, I'll open a draft pull request

@rooiratel
Copy link
Contributor

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

@quazar-omega
Copy link
Author

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

@quazar-omega
Copy link
Author

quazar-omega commented Jul 19, 2023

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.

Dependency problem

I've been trying to compile it, but I got stuck at a missing dependency when I run meson build:

Run-time dependency wayland-client found: NO (tried pkgconfig and cmake)

meson.build:45:0: ERROR: Dependency "wayland-client" not found, tried pkgconfig and cmake

But if I check my system, libwayland-client is present:

$ sudo dnf install libwayland-client
Last metadata expiration check: 0:22:04 ago on Wed 19 Jul 2023 12:26:42 CEST.
Package libwayland-client-1.22.0-1.fc38.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

I'm really confused, what should I do?

@quazar-omega
Copy link
Author

quazar-omega commented Jul 19, 2023

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?

@orowith2os
Copy link

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.

@quazar-omega
Copy link
Author

That would be great, but can it really be done without root?

@orowith2os
Copy link

Yes it can. That's why the InputCapture portal exists.

@quazar-omega
Copy link
Author

Oh cool, I'll be looking forward to it then!

@quazar-omega
Copy link
Author

quazar-omega commented Jun 17, 2024

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 🎉

gianklug added a commit to gianklug/wearewaylandnow that referenced this issue Jul 21, 2024
Adds showmethekey from
mpsq#184, removes unsupported
section.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants