keybinds 1.3.2__tar.gz → 1.3.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {keybinds-1.3.2 → keybinds-1.3.3}/PKG-INFO +13 -5
- {keybinds-1.3.2 → keybinds-1.3.3}/README.md +459 -451
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/__init__.py +48 -48
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_base_bind.py +196 -183
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_keyboard.py +857 -759
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_mouse.py +341 -324
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/logical/abbreviation.py +352 -337
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/logical/keyboard.py +1154 -1000
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds.egg-info/PKG-INFO +13 -5
- {keybinds-1.3.2 → keybinds-1.3.3}/pyproject.toml +1 -1
- {keybinds-1.3.2 → keybinds-1.3.3}/tests/test_bind_wait_and_is_pressed.py +154 -113
- {keybinds-1.3.2 → keybinds-1.3.3}/tests/test_runtime_edge_cases.py +590 -472
- {keybinds-1.3.2 → keybinds-1.3.3}/LICENSE +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_async.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_backend.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_bind_registry.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_constants.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_dispatcher.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_hook.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_parsing.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_state.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_window.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/bind.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/decorators.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/diagnostics/__init__.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/diagnostics/analysis.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/diagnostics/core.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/diagnostics/models.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/diagnostics/reporting.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/diagnostics/tracing.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/logical/__init__.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/logical/parsing.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/logical/translate.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/presets.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/simple.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/types.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/winput/LICENSE +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/winput/__init__.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/winput/vk_codes.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/winput/winput.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds.egg-info/SOURCES.txt +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds.egg-info/dependency_links.txt +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds.egg-info/requires.txt +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/keybinds.egg-info/top_level.txt +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/setup.cfg +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/setup.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/tests/test_bind_registry.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/tests/test_decorators_and_simple.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/tests/test_diagnostics.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/tests/test_logical_parsing.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/tests/test_parsing.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/tests/test_runtime_bindings.py +0 -0
- {keybinds-1.3.2 → keybinds-1.3.3}/tests/test_types.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: keybinds
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.3
|
|
4
4
|
Summary: Flexible global keyboard & mouse hotkeys for Windows
|
|
5
5
|
Author: echolane
|
|
6
6
|
License: MIT License
|
|
@@ -55,7 +55,7 @@ Flexible global keyboard & mouse hotkeys for Windows.
|
|
|
55
55
|

|
|
56
56
|

|
|
57
57
|

|
|
58
|
-

|
|
59
59
|

|
|
60
60
|
|
|
61
61
|
**keybinds** is a Python library for global keyboard and mouse binds on Windows, with support for hotkeys, logical key binds, text matching, and text abbreviations.
|
|
@@ -194,17 +194,25 @@ Top-level helpers use the default hook. If you use multiple hooks, prefer `hook.
|
|
|
194
194
|
|
|
195
195
|
## Bind state and waiting
|
|
196
196
|
|
|
197
|
-
All bind objects expose
|
|
197
|
+
All bind objects expose small runtime helpers:
|
|
198
198
|
|
|
199
199
|
```python
|
|
200
200
|
if bind.is_pressed():
|
|
201
|
-
print("
|
|
201
|
+
print("full chord is currently held")
|
|
202
|
+
|
|
203
|
+
if bind.any_pressed():
|
|
204
|
+
print("at least one key/button of this bind is held")
|
|
205
|
+
|
|
206
|
+
print(bind.pressed_keys()) # held VKs for this bind, or [button] for mouse
|
|
202
207
|
|
|
203
208
|
bind.wait() # wait until the bind fires
|
|
204
209
|
bind.wait(0.5) # wait up to 0.5s, returns True/False
|
|
205
210
|
```
|
|
206
211
|
|
|
207
|
-
`is_pressed()`
|
|
212
|
+
`is_pressed()` is true only when the current chord step is fully held (same `ChordPolicy` / `InjectedPolicy` rules as matching).
|
|
213
|
+
`any_pressed()` is true if any key or button belonging to that step is held.
|
|
214
|
+
`pressed_keys()` returns those held keys: sorted VK codes for keyboard/logical binds, or `[button]` / `[]` for mouse.
|
|
215
|
+
Text-sequence and abbreviation binds: `any_pressed()` follows buffer/pending match; `pressed_keys()` returns `[]`.
|
|
208
216
|
`wait(timeout=None)` blocks until the bind fires and returns `True`, or returns `False` on timeout.
|
|
209
217
|
|
|
210
218
|
---
|