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

Problems with kbdinfo #5258

Closed
scrouthtv opened this issue May 23, 2020 · 2 comments
Closed

Problems with kbdinfo #5258

scrouthtv opened this issue May 23, 2020 · 2 comments

Comments

@scrouthtv
Copy link

I am currently trying to test whether caps lock is pressed (because vim does weird things in caps lock which I'm always confused of). Since I don't have any x server running, I found that kbdinfo can check whether caps lock is enabled:

  • My Windows build number: Microsoft Windows [Version 10.0.19041.264]
  1. Install the kbd package under wsl (I am running Linux DESKTOP-0IB64NU 4.19.84-microsoft-standard #1 SMP Wed Nov 13 11:44:37 UTC 2019 x86_64 GNU/Linux).
  2. Run sudo kbdinfo gkbled. Should return scrolllock:off numlock:off capslock:off
  3. Now retype the command and activate at least one of scroll lock, numlock or caps lock and hit enter. It still returns scrolllock:off numlock:off capslock:off.
  • What's wrong / what should be happening instead:
    kbdinfo should return the enabled locks correctly.

  • Strace of the failing command, if applicable: https://pastebin.com/0iduYDCm

Does anyone know of a different way to check whether caps is enabled in wsl?

Thanks for any help in advance :)

@therealkenc
Copy link
Collaborator

Since I don't have any x server running

WSL (both 1 and 2) does not have a keyboard device, pretty much by-design. /dupe #1806 ref #2730. You are going to be better off drilling-down "my vim does weird things" in a forum like serverfault. TLDR If you really (really) want to query the caps lock state you need something like X11 or Wayland.

@ghost
Copy link

ghost commented May 24, 2020

Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.

Thanks for your report!

@ghost ghost added the duplicate label May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants