All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Removed several commented-out code lines from
manager.py,keys.py, andsound_player.py. - Synchronized version number to
0.2.2insrc/pykeybindmanager/__init__.pyandpyproject.toml. - Updated
README.mdto reflect version0.2.2and removed redundant installation step.
- Support for key combinations (e.g., "ctrl+alt+t", "cmd+s") via
parse_keybind_string. - New
trigger_typeoptions forKeybindManager:'toggle': Calls callback with'press'on each activation (for single keys or combinations).'hold': Calls callback with'press'on key down and'release'on key up (for single keys or combinations).
KeybindManagernow useson_releaseevents to track held keys for combinations and the'hold'trigger.
- Renamed original single/double press trigger logic to
trigger_type='double_press_toggle'.- Callback now receives
'single'or'double'event types. - This trigger type is now restricted to single keys (no modifiers) for simplicity and reliability.
- Callback now receives
- The
on_activatedcallback now consistently receives a string event type ('press','release','single','double') as its only argument. KeybindManagerinitialization now takeskeybind_definition(the tuple output fromparse_keybind_string) andtrigger_typeas required arguments.- Reduced logging verbosity. Default behavior is no output unless the application configures the
loggingmodule. Kept essentialINFOandERROR/WARNINGlogs. - Updated internal modifier key tracking.
- Ensured
_pressed_keysset is cleared on listener start and stop.
- Initial release of
pykeybindmanager. KeybindManagerclass to listen for single/double key presses of a single key usingpynput.parse_keybind_stringhelper function to convert single key names (e.g., 'f1', 'cmd', 'fn') topynputobjects.play_sound_fileutility to play 'start' and 'stop' notification sounds using platform-specific players.- Custom exceptions (
KeybindManagerError,ListenerError,PermissionError,InvalidKeybindError,PynputImportError). - Basic logging configuration.
- Support for macOS 'fn' key.
- Included 'doubleping.wav' and 'singleping.wav' sound files.