Detect keystates: capslock, numlock + more flexible input system for keyboards (DEF-2061)

Capslock is important for detecting it when typing passwords into a password field to warn the user of it. Num lock / scroll lock might be useful to someone some day…

input.is_key_locked(input.CAPS_LOCK)

I’d still like an input system more similar to this

http://www.monkey-x.com/docs/html/Programming_Key%20codes.html
http://www.monkey-x.com/docs/html/Modules_mojo.input.html

Then be able to do

local key_pressed = input.get_char()
if key_pressed == input.KEY_SPACE then ...

This could be separate from the main input system.

I’ve created a ticket specifically for detecting keyboard states such as caps and scroll lock: DEF-2061

1 Like