Layer.onKeyPress

Function/Meaning

Characters have been entered

Type
LayerclassEvent
Syntax
onKeyPress(key, process=true)
Arguments
key

The entered character.

process

If you pass false to this argument when calling onKeyPress of the parent class, the parent class will not do the default processing for that key (such as moving focus).

Return value
None (void)
Explanation

Occurs when characters are entered.
Unlike Layer.onKeyDown, onKeyDown handles virtual keycodes, whereas this event handles the characters themselves.
This event does not occur if the key pressed is a key that has nothing to do with the character (such as a function key).