Class: KeyEvent

The KeyEvent class is provided to your script when a keyboard event occurs. It contains information about the event.

Member Variables


view (MohoView)

A reference to the Moho editing view.


key (char)

The key character that was pressed.


keyCode (int)

A keycode to indicate which special key was pressed. See keycode constants.


shiftKey (bool)

True if the shift key is down, otherwise false.


ctrlKey (bool)

True if the ctrl key is down, otherwise false.


altKey (bool)

True if the alt key is down, otherwise false.