Skip to content

Outsource key input to Blessed #82

Open

Description

@thomasballinger

Rip out the innards of a curtsies.input.Input object and replace with calls to Blessed.Terminal.inkey()

Activity

  1. thomasballinger commented on Nov 3, 2015

    @thomasballinger
    MemberAuthor

    Potential issues so far:

    • can't set which stdin to use for cbreak (this is probably fine)
    • find out if Blessed does the VDSUSP trick on Macs/BSD (find issue for this, it's been talked about before)
    • find out behavior of inkey if SIGTSTP via dsusp happens (preventable, just turn of dsusp)
    • How to block on stdin and other file descriptors simultaneously (we still have access to sys.stdin)
    • blocked on resolution of Support comparators for matching keyboard input to meta and ctrl keys jquast/blessed#58 which I assume will start grouping escape-prepended keys instead of reporting them separately

    Plan: move paste detection into bpython, based on nonblocking readaheads instead of number of raw bytes read

  2. jquast commented on Sep 28, 2026

    @jquast

    blessed now supports ctrl, meta, etc., and the kitty keyboard protocol, mouse, bracketed paste

    Use is_sequence to detect special keys

    Use name to identify special keys by name (e.g., KEY_F1, KEY_CTRL_Q)

    Or, by using magic methods like keystroke.is_f1() or keystroke.is_key_ctrl('q').

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions