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.
Files changed (53) hide show
  1. {keybinds-1.3.2 → keybinds-1.3.3}/PKG-INFO +13 -5
  2. {keybinds-1.3.2 → keybinds-1.3.3}/README.md +459 -451
  3. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/__init__.py +48 -48
  4. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_base_bind.py +196 -183
  5. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_keyboard.py +857 -759
  6. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_mouse.py +341 -324
  7. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/logical/abbreviation.py +352 -337
  8. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/logical/keyboard.py +1154 -1000
  9. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds.egg-info/PKG-INFO +13 -5
  10. {keybinds-1.3.2 → keybinds-1.3.3}/pyproject.toml +1 -1
  11. {keybinds-1.3.2 → keybinds-1.3.3}/tests/test_bind_wait_and_is_pressed.py +154 -113
  12. {keybinds-1.3.2 → keybinds-1.3.3}/tests/test_runtime_edge_cases.py +590 -472
  13. {keybinds-1.3.2 → keybinds-1.3.3}/LICENSE +0 -0
  14. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_async.py +0 -0
  15. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_backend.py +0 -0
  16. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_bind_registry.py +0 -0
  17. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_constants.py +0 -0
  18. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_dispatcher.py +0 -0
  19. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_hook.py +0 -0
  20. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_parsing.py +0 -0
  21. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_state.py +0 -0
  22. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/_window.py +0 -0
  23. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/bind.py +0 -0
  24. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/decorators.py +0 -0
  25. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/diagnostics/__init__.py +0 -0
  26. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/diagnostics/analysis.py +0 -0
  27. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/diagnostics/core.py +0 -0
  28. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/diagnostics/models.py +0 -0
  29. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/diagnostics/reporting.py +0 -0
  30. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/diagnostics/tracing.py +0 -0
  31. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/logical/__init__.py +0 -0
  32. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/logical/parsing.py +0 -0
  33. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/logical/translate.py +0 -0
  34. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/presets.py +0 -0
  35. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/simple.py +0 -0
  36. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/types.py +0 -0
  37. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/winput/LICENSE +0 -0
  38. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/winput/__init__.py +0 -0
  39. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/winput/vk_codes.py +0 -0
  40. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds/winput/winput.py +0 -0
  41. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds.egg-info/SOURCES.txt +0 -0
  42. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds.egg-info/dependency_links.txt +0 -0
  43. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds.egg-info/requires.txt +0 -0
  44. {keybinds-1.3.2 → keybinds-1.3.3}/keybinds.egg-info/top_level.txt +0 -0
  45. {keybinds-1.3.2 → keybinds-1.3.3}/setup.cfg +0 -0
  46. {keybinds-1.3.2 → keybinds-1.3.3}/setup.py +0 -0
  47. {keybinds-1.3.2 → keybinds-1.3.3}/tests/test_bind_registry.py +0 -0
  48. {keybinds-1.3.2 → keybinds-1.3.3}/tests/test_decorators_and_simple.py +0 -0
  49. {keybinds-1.3.2 → keybinds-1.3.3}/tests/test_diagnostics.py +0 -0
  50. {keybinds-1.3.2 → keybinds-1.3.3}/tests/test_logical_parsing.py +0 -0
  51. {keybinds-1.3.2 → keybinds-1.3.3}/tests/test_parsing.py +0 -0
  52. {keybinds-1.3.2 → keybinds-1.3.3}/tests/test_runtime_bindings.py +0 -0
  53. {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.2
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
  ![Python](https://img.shields.io/badge/python-3.7%2B-blue)
56
56
  ![Platform](https://img.shields.io/badge/platform-windows-lightgrey)
57
57
  ![License](https://img.shields.io/badge/license-MIT-green)
58
- ![Status](https://img.shields.io/badge/status-active-success)
58
+ ![Status](https://img.shields.io/badge/status-maintenance-yellow)
59
59
  ![PyPI](https://img.shields.io/pypi/v/keybinds)
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 two small runtime helpers:
197
+ All bind objects expose small runtime helpers:
198
198
 
199
199
  ```python
200
200
  if bind.is_pressed():
201
- print("bind is currently active")
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()` checks whether the bind is currently 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
  ---