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

    Type Alias XtermMouseEvent

    XtermMouseEvent: SGRMouseEvent | ESCMouseEvent

    A discriminated union representing any mouse event from either protocol.

    This type combines both SGR and ESC mouse event types. The protocol property serves as a discriminant that allows TypeScript to narrow the type.

    mouse.on('press', (event: MouseEvent) => {
    if (event.protocol === 'SGR') {
    // TypeScript knows this is SGRMouseEvent
    console.log('Using modern SGR protocol');
    } else {
    // TypeScript knows this is ESCMouseEvent
    console.log('Using legacy ESC protocol');
    }
    });