Jump to content

[SOLVED] Keyboard callback ignored.


photo

Recommended Posts

Hello! We have a question about keyboard callbacks. When some key was pressed and released during we hold pressed some other key - callback for the held key is ignored. In fact, callback for that key begins skipped after we press another one, that's OK, but it's keep skipped when we already release interrupting key. How can we fix that? 

Thanks in advance!

Link to comment

Hi again,

 

Unigine will run callbacks as it receives messages from the OS so, for example, on Windows it'll forward key codes from WM_KEYDOWN and WM_SYSKEYDOWN messages to your key_press callback. As it's OS behaviour there's no need to fix that.

 

By the way, it's better to use engine.app.getKeyState and engine.app.clearKeyState for input handling.

Link to comment
×
×
  • Create New...