I need a way to detect if capslock is active, I know I could make a bool which switches when the capslock button is pressed, though I often get a desync between the state of capslock and the boolean.
Check if it’s on, like when you press it or check even with no input?
What if I don’t use any textboxes, how would that solution be viable to my situation then? I need something more generalized.
Um, this does not answer my question lol, but judging by the title name, when a player pressed Caps, you want to check if its lower or upper?
well in the post, you just sent, they have the answer…
Like say you press caps lock, all your characters will be capitalized. I want to know if that button is active or deactive. Essentially kind of what this post says,
What are you actually going to do?
I have a gui which does not use textboxes which I am going to use for typing things.
So, why you have to detect capslock is on?
To detect if the characters should be capitalized?
You need to find some way to get the first input (wether its on / off in the first place), then when caps is pressed change the boolean to not boolean
.
I think he wants to make some sort of custom text engine.
Try this:
Create either a textbox parented to nil or make it invisible, then manually open the textbox (Textbox:Focus
), when a player types set the textbox’s text to your textlababel or whatever, and check if the string is upper / lower.
Alright that sounds good, I already have an invisible textbox to allow I/O keys to be detected by UIS, so I can just use that.