Skip to main content

Cross-Platform Key Handling Module: Effortlessly Detect and Describe Keyboard Events

Project description

keypress

GitHub Actions Workflow Status Pypi versions

This module offers a comprehensive solution for handling keyboard input across platforms. Whether you’re detecting simple keypresses or complex key combinations, our get_key function and Keys constants deliver robust functionality with clear, descriptive outputs. Perfect for developers needing to implement precise keyboard interactions in their applications.

Installation

You can install keypress via pip:

pip install keypress

Example

You can run keypress in your terminal.

from keypress import Keys, get_key

if __name__ == "__main__":
    key = ""
    while key not in ["q", Keys.ENTER]:
        key = get_key()
        if key.is_printable:
            print(key)
        print(key.key_codes)
        print(key.description)

Contributing

Contributions are welcome! Please see our contributing guidelines for more information.

License

This project is licensed under the MIT License. See the LICENSE file for details.

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

keypress-0.1.4.tar.gz (4.9 kB view hashes)

Uploaded Source

Built Distribution

keypress-0.1.4-py3-none-any.whl (5.3 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