How to tell if Capslock is on

BlitzMax Forums/BlitzMax Beginners Area/How to tell if Capslock is on

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Look for the little light on your keyboard? ;-)


Seriously though -- good question.
A quick test shows that the keycode returned when you *press* caps-lock is 20.

(Duh. And *after* the fact of finding this out I see that there is indeed a predefined constant of Key_Capslock that is set to 20) Anyway, that doesn't do a whole lot of good I guess, since it doesn't tell you the current state, just whether or not someone is actively holding it down at the moment.

The recently added GetChar() doesn't seem to detect Caps Lock at all (Since it isn't actually a character key, and has no ASCII value to return obviously)