Detecting caps lock with Input?



  • Is there any possible way to determine if a user's caps lock is on. The user could potentially have it on before loading my application. It seems there is a code to determine if caps lock is pressed, but not if its on already.

    This is for target HTML5 by the way.



  • That suppose to be: openfl.ui.Keyboard.capsLock... It does not seem to work tough. It only compiles on -Dnext and then still gives invalid info. Always False on Cpp, Null on Neko. I did not check the other targets. Maybe it works on HTML5. Please let everybody know if you have tried it.!



  • I've tried it and its null. The thing is after looking at Keyboard.hx, it's set to null by default:
    public static var capsLock (default, null):Bool;



  • Hmm. Only the default boolean value. False for Bool, null for Null<Bool>. It indeed does not seem to be implemented at all. Just declared. I dont know if there is an other way trough some other API. But flash.ui.Keyboard.capsLock is the default AS3 one. It should be implemented.

    Anyways, I personally don't know a other way. Sorry!


Log in to reply
 

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.