Cross-Platform Key Handling Module: Effortlessly Detect and Describe Keyboard Events
Project description
keypress
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
Built Distribution
File details
Details for the file keypress-0.1.7.tar.gz
.
File metadata
- Download URL: keypress-0.1.7.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.5 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 746b1285ef2fbfe1d084be66b511683f14a8857137c215709e5abbab59bb0c36 |
|
MD5 | d70636c688ee953743975eda180b52f9 |
|
BLAKE2b-256 | 772a120ee27e559b78904ce0f932fcf61e696453dc71038076ede03fc065b972 |
File details
Details for the file keypress-0.1.7-py3-none-any.whl
.
File metadata
- Download URL: keypress-0.1.7-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.5 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f2b7e1b1911379e29884196b62bc0d2f95993dd0245750f10043e34736c6a1d |
|
MD5 | aa344a238b9055f484253cc80fbd9994 |
|
BLAKE2b-256 | 13efa43520f90f6488f9687058254e96c39505e0fadc01f834742b6ab48b3e18 |