Tuesday, July 12, 2022
HomeGame DevelopmentFind out how to get ModifierState with Eventkeyboard in cocos creator 3.5.2?...

Find out how to get ModifierState with Eventkeyboard in cocos creator 3.5.2? – Cocos Creator


Whats up,
I’m focusing one downside with EventKeyboard in cocos creator 3.5.2.
I can get keycode for Enter.EventType(KEY_DOWN, KEY_PRESSING, KEY_UP).
I have to test if capslock is on or off.
How can I do it in cocos creator 3.5.2?

It appears that evidently it’s potential to register SystemEvent to cocos Occasion by utilizing enter object.
However, I’m not positive the way it works.

Finest Regards


sure, you may attempt to get ModifierState from KeyboardEvent

Thank very a lot to your assist.
It’s potential with KeyboardEvent.
However, it appears keyboardEvent is deprecated from cocos creator 3.4.
As a substitute of, EventKeyboard is supported.
How can I take advantage of KeyboardEvent in cocos creator 3.5.2?
Finest Regards

We’ll take away the rawEvent later when we’ve a whole different, which you’ll be able to at present get via the rawEvent.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments