{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/2"},{"label":"User Interfaces","url":"https://skillfed.io/packages/category/software-development-user-interfaces"}],"enrichment":{"capability":"Reads single characters and keystrokes from stdin, handling both ASCII characters and multi-character keys like arrows, function keys, and modifier combinations across Windows, Linux, and Unix systems.","skillfed_tags":["terminal-input","cross-platform","cli-tools"],"use_cases":["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\u2013F12) 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"],"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.\n\nTypically 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\u2014Windows console APIs vs. Unix termios\u2014so your code stays simple and portable.","worth_installing":"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."},"id":"readchar","links":{"html":"https://skillfed.io/packages/readchar","md":"https://skillfed.io/packages/readchar.md","pypi":"https://pypi.org/project/readchar/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-04-06","license_spdx":null,"license_treatment":"permissive","name":"readchar","python_support":"supports_current","summary":"Library to easily read single chars and key strokes"},"popularity":{"monthly_downloads":15794533,"position":1172,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"4.2.2"}
