$npx skillfedfor your agent

readchar

Library to easily read single chars and key strokes

Worth itPyPI Software DevelopmentReleased Apr 202615.8M downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — readchar-4.2.2-py3-none-any.whl
v4.2.2 · released 2026-04-06 · Python >=3.8

Yes. readchar is stable, actively maintained, has zero dependencies, and solves a genuine problem for terminal applications. The MIT license is permissive, and the library's narrow scope and small footprint make it a low-risk addition. Install it if you need to handle raw keyboard input in a CLI or terminal UI.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires a terminal that supports raw input mode; behavior is undefined when stdin is piped or redirected from a non-interactive source.
  • Low friction: pure Python wheel with no runtime dependencies.
  • Actively maintained as of 2026-04-06 with a stable release cadence.

License · maintenance · safety

permissive license (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

last release 2026-04-06 (130 days) · last repo commit 2026-04-06 · 180 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 15,794,533 downloads/mo, #1,172 on PyPI

Verify before relying

pip install readchar

import readchar
from readchar import readkey, key

while True:
    k = readkey()
    if k == key.DOWN:
        print("Down arrow pressed")
    elif k == key.ENTER:
        break
  • Whether readkey() correctly handles all modifier combinations (CTRL+ALT) on all supported platforms
  • Performance characteristics when reading from pipes or redirected input vs. interactive terminals
  • Behavior on Android and FreeBSD/OpenBSD (listed as enabled but not actively tested)
Same gist for agents: .md · .json

What it is and what it does

readchar is a lightweight library for capturing keyboard input at the character and keystroke level in terminal applications. It abstracts away platform differences so you can read single keys, arrow keys, function keys, and modifier combinations (CTRL, ALT) in a portable way across Windows, Linux, and Unix. The library exposes two main functions: readchar() for single characters and readkey() for full keystrokes, plus a key module with named constants for special keys and a config class to customize interrupt behavior.

Typically used in interactive CLI tools, terminal UIs, and menu-driven applications where you need to respond to individual keypresses rather than waiting for a full line of input. It handles the low-level platform differences—Windows console APIs vs. Unix termios—so your code stays simple and portable.

Use it for

  • Build interactive CLI menus that respond to arrow keys and Enter without waiting for line input
  • Implement terminal-based games or interactive tools that need real-time keystroke detection
  • Create command-line interfaces that handle function keys (F1–F12) for help or actions
  • Capture CTRL and ALT key combinations in terminal applications for custom shortcuts
  • Develop cross-platform terminal UIs that work identically on Windows and Linux

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

readchar is stable, actively maintained, has zero dependencies, and solves a genuine problem for terminal applications. The MIT license is permissive, and the library's narrow scope and small footprint make it a low-risk addition. Install it if you need to handle raw keyboard input in a CLI or terminal UI.

Install

readchar on PyPI

Before you install

Low friction: pure Python wheel with no runtime dependencies. Actively maintained as of 2026-04-06 with a stable release cadence.

Requires a terminal that supports raw input mode; behavior is undefined when stdin is piped or redirected from a non-interactive source.

License in practice

MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

Quickstart

pip install readchar

import readchar
from readchar import readkey, key

while True:
    k = readkey()
    if k == key.DOWN:
        print("Down arrow pressed")
    elif k == key.ENTER:
        break

Verify before relying

  • Whether readkey() correctly handles all modifier combinations (CTRL+ALT) on all supported platforms
  • Performance characteristics when reading from pipes or redirected input vs. interactive terminals
  • Behavior on Android and FreeBSD/OpenBSD (listed as enabled but not actively tested)

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 130 days since the last release
Last repo commit
First released
Downloads15,794,533 / month, #1,172 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Software DevelopmentTopic :: Software Development :: User Interfaces

Evidence: readchar-4.2.2-py3-none-any.whl

Tags

Capabilities
read keyboard input from stdinsingle character keystroke readercross-platform terminal inputarrow key detectioncommand line key handlingraw stdin character capturefunction key recognition
Topics
terminal-inputcross-platformcli-tools
PyPI keywords
characterskeystrokesstdincommand line

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “single character keystroke reader”

  • readcharReads single characters and keystrokes from stdin, handling both…
  • streamlit-keyupAdds real-time text input to Streamlit apps that fires on every…
  • easyocrEasyOCR performs optical character recognition on images across 80+…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also python-yakh · urwid-readline · pwinput · pinyin · Unidecode · anyascii · keyboard · chardet · streamlit-keyup · grapheme