Window.postInputEvent

Function/Meaning
Generation of input events
Type
Method of the Window class
Syntax
postInputEvent(eventname, params=null)
Arguments
eventname Specifies the event name. Use the following strings.
params Specifies a dictionary array containing the event parameters.
  • For "onKeyDown" and "onKeyUp" events, store the virtual key code in "key" and the shift state in "shift". If "shift" is omitted, it is assumed to be 0.
  • For the "onKeyPress" event, specify the character in "key".
Return Value
None (void)
Description
Generates an input event. In the current version, three events related to key input can be generated.
This method generates the event as an asynchronous event. That is, this method returns without waiting for the completion of the corresponding event handler. The event handler is actually called and processed after control is returned to KiriKiri.
Like normal input events, input events occur as the corresponding events of the Layer class in addition to the Window class.
Example:
postInputEvent('onKeyDown', %[key: VK_UP, shift: ssShift]);
postInputEvent('onKeyUp',   %[key: VK_UP, shift: ssShift]);
    // Press the Up cursor key