xlib-hotkeys
Python library for Linux to register keyboard combinations to a callback function.
Requirements
- Python 3.7 or later
Installation
Install using:
pip install xlib-hotkeys
Usage
You can use this module from the command line
xlib-hotkeys -h
xlib-hotkeys -d :0 -k ctrl+return shift+f2
from xlib_hotkeys import HotKeysManager
def KeyDown(key, keyspressed):
print(f"Keys Pressed: {keyspressed}")
def Hotkey1():
print(f" Hotkey1 detected")
def Hotkey2():
print(f" Hotkey2 detected")
hk = HotKeysManager(display_str=":0")
hk.KeyDown = KeyDown
hk.hotkeys["ctrl+return"] = Hotkey1()
hk.hotkeys["shift+f2"] = Hotkey2()
hk.start()
time.sleep(50)
hk.stop()
Metadata
Release files for xlib-hotkeys 2024.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xlib_hotkeys-2024.3.0.tar.gz | 4.2 kB | Without provenance | Details for xlib_hotkeys-2024.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xlib_hotkeys-2024.3.0-py3-none-any.whl | Python 3 | none | any | Details for xlib_hotkeys-2024.3.0-py3-none-any.whl |
Total release size: 9.1 kB
Release files / xlib_hotkeys-2024.3.0.tar.gz
| Download URL | xlib_hotkeys-2024.3.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2911a8678e4e814e5438c6489930c8ae04d714fcda00dd0dfc8bc77a89d6d945
|
|
BLAKE2b-256 checksum How to use checksums |
80cb13aaffbd3e9dc729dd41ab6baa2432ff7874ea789fb4b218474e2af0a711
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Release files / xlib_hotkeys-2024.3.0-py3-none-any.whl
| Download URL | xlib_hotkeys-2024.3.0-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ea3afbd683ebf794aa8411a917c1688e0c04fae80f9110a1feece7ed0d5c025c
|
|
BLAKE2b-256 checksum How to use checksums |
5da21e88b5862b2bd93e7316417250e505c767fe18d3491f8a3ceb5022710c90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Security for xlib-hotkeys 2024.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.