-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Get current state of CapsLock key? #1391
Comments
This is not currently possible. The state is passed as a modifier to key events so you could learn about the state as soon as a user presses a key which is nearly as good I hope? |
Well my concern is if they accidentally launch the program with the CapsLock already engaged, then set the password, then are very confused when the launch the program to enter their set password w/o CapsLock engaged and their password doesn't match, and they don't know why. Not sure if I could simulate a capslock press to discover the state, then reset it and notify the user if caps lock is on. Not a major concern overall I suppose, but would be nice to have. |
I could see that being quite useful as well. Might even be useful for fynedesk when we want to have a fancy login screen :) |
I agree @deranjer - there is definitely value here, but this might be outside the control of Fyne as it gets the events from GLFW so might have to request this feature from that project (https://github.com/glfw/glfw) for Desktop, then Mobile is a whole different story (https://github.com/golang/mobile) |
@stuartmscott The start of this may have been added in 3.3? A status for "Lock Key Query" shows it was completed for 3.3 (which released in 2019). This is the ticket that was for the lock state of keys: glfw/glfw#946 |
I can't see that in the exported Go API in the go-gl/glfw project, might need to work on the upstream API to gain access to this functionality. |
So the only mention I could find in go-gl/glfw was in input.go |
Yes that change is what adds support for capslock modifier, which we added in 1.3. |
I have a gui where the user needs to create a password. I wish to warn the user if the capslock is on.
I can easily capture capslock key EVENTS, so if I assume capslock is already off, I can warn them if it is turned on, but want to warn the user if the capslock key is on when they launch the app. Is that possible?
The text was updated successfully, but these errors were encountered: