I am using WSL 1 (Windows subsystem for Linux) in windows 10 version 2004 as an SU user (# prompt).
I am attempting to determine the status of my capslock key by using the BASH shell command “kbdinfo gkbled capslock”.
Unfortunately, instead of getting the capslock key status I am getting an indication of “Couldn't get a file descriptor referring to the console”
I can only assume that this indication relates to not being able to access a “console file” or there is some type of permission issue regarding the console file. I searched within WSL thinking the console file would usually be found in “/dev/console” but I was unable to locate the console file any where within the WSL folder structure.
Can anyone provide me with some guidance regarding this issue? Spending an enormous amount of search time using many different search engines to resolve this issue did not yield anything of value since it seems that the “Couldn't get a file descriptor referring to the console” error indication is a very generic indication related to many other BASH command error failures and does not seem specific to my particular “kbdinfo” command issue.
My experience dealing with these so called “generic” Linux based failure indications is that they are almost always impossible to resolve in a timely manner when using typical search engine usage. I usually end up spending an additional exhaustive and frustrating amount of time going through many web-based forums etc. for answers.
In the case where no answer exists for this query, I would be open to another BASH command that would yield the capslock key status as long as it works within WSL for windows 10.
Thanks
Ed R