Skip to content
FutureBlitz

    Install

    Import std.term.input

    InputEvent

    std.term.input

    struct

    Public Struct InputEvent Implements Printable

    Something that came from a terminal: a Key, what the Mouse did, the Columns and Rows it has after a RESIZE, or the Text PASTEd, by its Kind.

    std/term/input.fb, line 236

    • Public ReadOnly Field Kind: InputKind field #

      What it is.

    • Public ReadOnly Field Key: KeyEvent field #

      A KEY's key.

    • Public ReadOnly Field Mouse: MouseEvent field #

      A MOUSE's mouse event.

    • Public ReadOnly Field Columns: Int field #

      How many columns the terminal has after a RESIZE.

    • Public ReadOnly Field Rows: Int field #

      How many rows the terminal has after a RESIZE.

    • Public ReadOnly Field Text: String field #

      A PASTE's text.

    • Public New(key: KeyEvent) constructor #

      A key typed.

    • Public New(mouse: MouseEvent) constructor #

      What the mouse did.

    • Public New(columns: Int, rows: Int) constructor #

      The terminal's size once it's changed.

    • Public New(pasted: String) constructor #

      Text pasted.

    • Public Method IsChar(c: Char): Bool method #

      Whether it's the key that types c, as KeyEvent's IsChar says.

    • Public Method IsKey(code: KeyCode): Bool method #

      Whether it's that key without a character, with no modifiers.

    • Public Method ToString(): String method #

      Like "key Ctrl+C", "mouse PRESS LEFT at 3, 4", "resize 80x24", or "paste "text"".

    Report an issue with this page or with FutureBlitz on GitHub.