@cartridge-engine/keyboard-engine
    Preparing search index...

    Type Alias ESCMouseEvent

    ESCMouseEvent: MouseEventBase & { protocol: "ESC" }

    A mouse event using the legacy ESC (escape sequence) protocol.

    The ESC protocol is the original mouse encoding scheme for terminals. It uses the format ESCCbCxCyM where coordinates are encoded as characters (code + 32) and button/action state is packed into a single byte.

    Limitations compared to SGR:

    • Maximum coordinate value of 223 (0-indexed: 222) - some terminals limit to 95
    • Less clear encoding of button state and release events
    • No dedicated release encoding (release is inferred from button code 3)

    Despite limitations, this protocol is still widely supported by older terminals and is used as a fallback when SGR is not available.

    if (event.protocol === 'ESC') {
    // This is an ESC event with potential coordinate limitations
    if (event.x > 95) {
    console.warn('Coordinates may be truncated on some terminals');
    }
    }