You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]
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).
Run sudo kbdinfo gkbled. Should return scrolllock:off numlock:off capslock:off
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.
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.
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.
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 whethercaps lock
is enabled: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
).sudo kbdinfo gkbled
. Should returnscrolllock:off numlock:off capslock:off
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 :)
The text was updated successfully, but these errors were encountered: