Key Events needed in WebApp

No worries at all

Here you go:

Left the original WebTextField and The SDKControlClass. That only check the enter key with no options.

WebCanvasKeyEvent and WebTextFieldKeyEvent use the modified SDKMultiKeyControlClass.
This adds inspector options to allow selection of the keys you want. I added ArrowKeys, Numbers 0 - 9, NumPad 0 - 9, a - z. Anyone know how to change these booleans into a table on the inspector window?

WebTextFieldKeyEvent1 on WebPage1 will show the KeyName, KeyCode, and Data in ListBox2 when the Enter key is pressed
WebCanvasKeyEvent1 on WebPage1 will show the KeyName, KeyCode in ListBox1 when any other keys are pressed.

In order to capture the arrow keys I needed to add the event with document.onkeydown so that runs. addEventListener(‘keypress’ adds it directly to the object. Let me know of issues or things to make it better

5 Likes