Skip to main content

Terminal key press debugger

Project description

CircleCI Codecov PyPi Release

Simple terminal key press debugger.

termdbg echoes the bytes received directly from the terminal for debugging exactly what bytes or escape sequences a particular terminal is sending. The terminal is set to raw mode if possible.

termdbg’s output is intended for human consumption; the output format is not guaranteed and should not be parsed.

To exit, send the byte value 3. This is the ASCII encoding for ^C (End Of Text), which is sent by pressing CTRL-C for most terminals. If you are unable to exit, you can send SIGINT from a separate terminal.

Example usage:

$ termdbg
27, o33, 0x1B  # F1 pressed, terminal emits three bytes
79, o117, 0x4F
80, o120, 0x50
27, o33, 0x1B  # F2 pressed, terminal emits three bytes
79, o117, 0x4F
81, o121, 0x51
3, o3, 0x3  # Ctrl-C pressed, terminal emits ^C and termdbg quits
$

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mir.termdbg-1.0.0.tar.gz (6.9 kB view hashes)

Uploaded Source

Built Distribution

mir.termdbg-1.0.0-py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page