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

**URL:** <https://forum.defold.com/t/detect-keystates-capslock-numlock-more-flexible-input-system-for-keyboards-def-2061/2690>\
**Category:** Feature requests (USE GITHUB)\
**Created:** [August 21, 2016, 11:20pm UTC](https://forum.defold.com/t/detect-keystates-capslock-numlock-more-flexible-input-system-for-keyboards-def-2061/2690 "2016-08-21T23:20:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pkeod](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pkeod/32/606_2.png) [@Pkeod](https://forum.defold.com/u/Pkeod)\
**Post date:** [August 21, 2016, 11:20pm UTC](https://forum.defold.com/t/detect-keystates-capslock-numlock-more-flexible-input-system-for-keyboards-def-2061/2690/1 "2016-08-21T23:20:53Z")

</div>

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…

```lua
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/Programming_Key%20codes.html)  
[http://www.monkey-x.com/docs/html/Modules\_mojo.input.html](http://www.monkey-x.com/docs/html/Modules_mojo.input.html)

Then be able to do

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

```

This could be separate from the main input system.

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [August 22, 2016, 6:00am UTC](https://forum.defold.com/t/detect-keystates-capslock-numlock-more-flexible-input-system-for-keyboards-def-2061/2690/2 "2016-08-22T06:00:34Z")

</div>

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