A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Separate names with a comma.
Discussion in 'Scripting' started by ghostshot3, Jul 2, 2018.
How to detect if my capslock is activate in keyboard using c# ?
Event.capsLock as seen here: https://docs.unity3d.com/ScriptReference/Event-capsLock.html
Hmmm... Try using the code suggested by quicktom here: https://answers.unity.com/questions/164795/unable-to-trace-capslock-on-and-off.html
public static extern short GetKeyState(int keyCode);
bool isCapsLockOn = false;
isCapsLockOn = (((ushort)GetKeyState(0x14)) & 0xffff) != 0;//init stat
isCapsLockOn = !isCapsLockOn ;
Personally, that code is out of my area of knowledge so I can't guarantee anything there.
If that doesn't work, post the code that you used.
I hope this fixes the problem!
It worked thanks ,and yes i didnt understand this code too lol
Lol. I'm glad that it worked.