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

    Type Alias SGRMouseEvent

    SGRMouseEvent: MouseEventBase & { protocol: "SGR" }

    A mouse event using the SGR (Select Graphic Rendition) protocol.

    The SGR protocol is the modern, preferred encoding for terminal mouse events. It uses the format ESC[<Cb;Cx;CyM (press) or ESC[<Cb;Cx;Cym (release), where the terminator character ('M' or 'm') distinguishes press from release.

    Advantages over the legacy ESC protocol:

    • Supports coordinates beyond 223 (practically unlimited)
    • Clearer encoding of button state and actions
    • Better support for modern terminal features
    if (event.protocol === 'SGR') {
    // This is an SGR event with high-precision coordinates
    console.log(`Position: ${event.x}, ${event.y}`);
    }