Changes
-
Make the Esc key in the terminal fire only when it is physically released.
By default, we use the Esc key as a modifier. Its press+release events will only be sent after the key is physically released, and only if no other keys were pressed along with Esc. This behavior is configurable, see the<config/events/terminal/>configuration subsection. -
Introduce
vtm.terminal.KeyEvent({...}, ..., {...})function.attribute type description keystatInteger Key state: 0 - released; 1 - pressed; 2 - repeated. ctlstatInteger Keyboard modifiers (bit-field). virtcodInteger Key virtual code. scancodInteger Key scan code. keycodeInteger Vtm specific key code. extflagInteger Extended flag (win32 specific). clusterString Text string generated by the key. Example:
-- Send pressed Esc key event vtm.terminal.KeyEvent({ keystat=1, virtcod=0x1b, scancod=1, cluster='\\u{1b}' }) -- Send released Esc key event vtm.terminal.KeyEvent({ keystat=0, virtcod=0x1b, scancod=1 })