Page 1 of 1

Detect Caps Lock? [resolved]

Posted: Wed Dec 05, 2012 7:48 pm
by OmarShehata
Is there any way to detect if Caps Lock is toggled? I could detect if the key was pressed, but if I open the game with caps lock already toggled, is there any way to find that out?

Re: Detect Caps Lock?

Posted: Wed Dec 05, 2012 10:39 pm
by gladius2metal
did you try keyreleased? according to the the wiki, it works this way:
capslock Caps-lock key Caps-on is a key press. Caps-off is a key release.
https://love2d.org/wiki/KeyConstant

https://love2d.org/wiki/love.keyreleased

Re: Detect Caps Lock?

Posted: Fri Dec 07, 2012 1:39 pm
by OmarShehata
gladius2metal wrote:did you try keyreleased? according to the the wiki, it works this way:
capslock Caps-lock key Caps-on is a key press. Caps-off is a key release.
https://love2d.org/wiki/KeyConstant

https://love2d.org/wiki/love.keyreleased
Thanks! That worked.