Detect Caps Lock? [resolved]

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
OmarShehata
Party member
Posts: 259
Joined: Tue May 29, 2012 6:46 pm
Location: Egypt
Contact:

Detect Caps Lock? [resolved]

Post 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?
Last edited by OmarShehata on Fri Dec 07, 2012 1:40 pm, edited 1 time in total.
User avatar
gladius2metal
Prole
Posts: 26
Joined: Thu Nov 22, 2012 2:08 am

Re: Detect Caps Lock?

Post 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
User avatar
OmarShehata
Party member
Posts: 259
Joined: Tue May 29, 2012 6:46 pm
Location: Egypt
Contact:

Re: Detect Caps Lock?

Post 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.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 206 guests