Window.postInputEvent

機能/意味
Generate input events
タイプ
Windowクラスのメソッド
構文
postInputEvent(eventname, params=null)
引数
eventname  Specify the event name. Specify with the following character string.
params  Specify the dictionary array that stores the parameters of the event.
  • For "onKeyDown" and "onKeyUp" events, the virtual key code is stored in "key" and the shift status is stored in "shift". If "shift" is omitted, it is assumed to be 0.
  • In the "onKeyPress" event, specify a character for "key".
戻り値
なし (void)
説明
 Generate 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. In other words, this method returns without waiting for the corresponding event handler to finish. The event handler is actually called and the processing is performed once control returns to Kirikiri.
 Input events occur not only in the Window class but also as applicable events in the Layer class, just like normal input events.
例:
postInputEvent('onKeyDown', %[key: VK_UP, shift: ssShift]);
postInputEvent('onKeyUp',   %[key: VK_UP, shift: ssShift]);
    // Press the left cursor key