# Python Global Hotkey Bindings for Windows
Use this library to set system wide keybindings for your code to respond to.
## Installation
```
pip install global-hotkeys -U
```
## Example usage
```python
from global_hotkeys import *
import time
# Flag to indicate whether the program should continue running.
is_alive = True
def print_hello():
print("Hello")
def print_world():
print("World")
def print_foo():
print("Foo")
def print_bar():
print("Bar")
def print_with_params(params):
print(params["test"])
def press_with_params(params):
print(params["press_param"])
def release_with_params(params):
print(params["release_param"])
def exit_application():
global is_alive
print("exiting")
stop_checking_hotkeys()
is_alive = False
# Declare some key bindings.
bindings = [
["control + 7, control + 4", None, print_world, True],
# You can use direct keycodes as well (useful for non-US keyboard layouts):
["control + 0x35", None, print_hello, False], # 0x35 is the keycode for the '5' key
["control + 6", None, print_with_params, False, {"test":5}],
[
"control + 8",
press_with_params,
release_with_params,
False,
{"press_param":"pressed!"},
{"release_param": "released!"}
],
# dict style
{
"hotkey": "control + 4",
"on_press_callback": None,
"on_release_callback": print_with_params,
"actuate_on_partial_release": False,
"callback_params": {"test": "testing"},
},
# dict style with differentiating params for press and release callbacks
{
"hotkey": "control + 9",
"on_press_callback": press_with_params,
"on_release_callback": release_with_params,
"actuate_on_partial_release": False,
"press_callback_params": {"press_param":"ctrl+9 pressed!"},
"release_callback_params": {"release_param": "ctrl+9 released!"},
},
["window + 1", None, print_foo, False],
["t,m", None, print_bar, False],
["control + Q", None, exit_application, False],
]
# Bindings take on the form of:
# <binding>, on_press_callback, on_release_callback, actuate_on_partial_release_flag, callback_params
#
# *Note that callback_params will be passed to both press and release callback functions
#
# Or in explicit dict format:
# {
# "hotkey": <binding>,
# "on_press_callback": <press_callback>,
# "on_release_callback": <release_callback>,
# "actuate_on_partial_release": False | True,
# "callback_params": <a variable or expression can go here> <-- This applies to both callbacks.
# "press_callback_params": <a variable or expression can go here>
# "release_callback_params": <a variable or expression can go here>
# }
# It's useful to have 'actuate_on_partial_release_flag' set to False,
# so your modifier keys don't get in the way of any automatic keyboard output you're doing in response.
# Note the actual hotkey syntax. Key combinations are denoted via the '+' character,
# and additional key chords are separated by commas. Spaces are ignored.
# Register all of our keybindings
register_hotkeys(bindings)
# Finally, start listening for keypresses
start_checking_hotkeys()
# Keep waiting until the user presses the exit_application keybinding.
# Note that the hotkey listener will exit when the main thread does.
while is_alive:
time.sleep(0.1)
```
## Explanation of the binding structure
Let's go in more details on how the binding is structured, You have two options either to declare the binding explicitly like this within curly brackets:
```
# {
# "hotkey": <binding>,
# "on_press_callback": <press_callback>,
# "on_release_callback": <release_callback>,
# "actuate_on_partial_release": False | True,
# "callback_params": 1ms": <a variable or expression can go here>
# "release_callback_params": <a variable or expression can go here>
# }
```
Or implicitly by the position of the parameter:
```
["hotkey", on_press_callback, on_release_callback, actuate_on_partial_release,press_callback_params,release_callback_params]
```
- **hotkey:** A string representing the key combination that triggers the callbacks, such as "control + 7, control + 4".
- **on_press_callback:** The function to be called when the hotkey is pressed. Can be None or a function reference.
- **on_release_callback:** The function to be called when the hotkey is released. Can be None or a function reference.
- **actuate_on_partial_release:** A boolean indicating whether the release callback should be triggered on a partial release of the key combination.
- **callback_params:** Parameters to be passed to both the press and release callbacks. This should be a dictionary.
- **press_callback_params, release_callback_params:** Parameters specifically for the press,release callbacks. This should be a dictionary (key-value pairs Like in this example ```"press_callback_params": {"press_param":"ctrl+9 pressed!"}```) .
## If you are on a non-US keyboard layout...
You may need to manually figure out the keycodes for the keys you want to bind to, and use those keycodes directly instead of the keynames in your bindings. I've included a useful utility for doing so.
Just open an interactive shell, and import my keycode_checker module to begin figuring out what your desired keys' keycodes are.
```python
>>> from global_hotkeys import keycode_checker
```
You'll see the `Press any key (Ctrl+C to exit)` prompt and can begin pressing keys until you've gathered your desired keycodes:
```
Key pressed: a
VK Code: 0x1E
Key pressed: b
VK Code: 0x30
```
And in your code that's actually setting up keybindings maybe you'd use something like:
```python
# Assume our previous example setup code from above
bindings = [
["control + 0x1E", None, print_hello, False],
# whatever other bindings...
]
```
That said, if your modifier keys' keycodes (e.g. for control, shift, alt) are different than what's listed in [keycodes.py](https://github.com/btsdev/global_hotkeys/blob/master/global_hotkeys/keycodes.py), you'll likely need to just fork this project and modify the source to make things work. CD into your forked copy of the repos and use `pip install -e ./` to apply your changes as you experiment and use your forked version of the library instead. Certainly not a perfect solution, admittedly...
As the code needs to differentiate between modifier keys and non-modifier keys, some further update may be necessary to allow for changing/specifying modifier keycodes as well for non-US keyboard layouts.
## Also note that I've included a simple global snippets example using this functionality.
It's in the `tests` folder if you download this project's source from [GitHub](https://github.com/btsdev/global_hotkeys).
It's the file `global_snippets.py` and it demonstrates toggling on and off global snippets using a hotkey, and using key chords to inject snippets, in this case the current date time. This is a nod to a user who emailed regarding the addition of this functionality.
It achieves this by pasting in the current date time to any input field after backspacing to erase the snippet's chord from the input field (careful where you use it though. For faster input of snippets, I relied on just placing the date string into the clipboard and emulating CTRL+V to paste).
Also, it uses the winsound library's Beep function to emit a low and subtle visual cue to indicate whether you just toggled the global snippets on or off.
### Try setting up and using the Hyperkey to avoid hotkey conflicts with your applications.
I personally use the Hyperkey (which is basically Window+Control+Shift+Alt and also known as the 'OfficeKey' on keyboards that have actually have it) to avoid clashing with most applications' own hotkeys, which is normally not available in windows, but it can be setup using [Autohotkey](https://stackoverflow.com/questions/40435980/how-to-emulate-hyper-key-in-windows-10-using-autohotkey) and also applying the [OfficeKeyFix](https://github.com/anthonyheddings/OfficeKeyFix) which you'll need to compile yourself if one is interested. You can read more about the officekey issue on [Super User](https://superuser.com/questions/1455857/how-to-disable-office-key-keyboard-shortcut-opening-office-app). I personally mapped it to my right control key instead of the capslock key; it was just a simple edit to the Autohotkey script. Both of these I placed in my windows startup folder, and then I was all set.
## Additional functionality
You may also add/remove keybindings one at a time, in bulk, or completely clear them all out (which also stops the hotkey listener thread).
```python
# Just reusing our bindings declaration from above (this is not a complete code example, btw).
bindings = [
["control + 7, control + 4", None, print_world, True],
["control + 5", None, print_hello, False],
["window + 1", None, print_foo, False],
["t,m", None, print_bar, False],
["control + Q", None, exit_application, False],
]
# Register a single keybinding (if it's not already registered).
# Returns True if the key didn't already exist and was added,
# else False (the binding is already registered - remove it first if
# you wish to overwrite it with new event handlers).
register_hotkey(bindings[0])
# Remove a single keybinding (if it exists).
# Returns True if the key existed and was removed, else False (the binding is already gone).
remove_hotkey(bindings[0])
# Register a list of keybindings.
register_hotkeys(bindings)
# Remove a list of keybindings.
remove_hotkeys(bindings)
# Remove all keybindings and terminate the hotkey listener thread.
clear_hotkeys()
```
## List of the available keys
```
backspace
tab
clear
enter
shift
control
alt
pause
caps_lock
escape
space
page_up
page_down
left_window
right_window
window
end
home
left
up
right
down
select
print
execute
enter
print_screen
insert
delete
help
0
1
2
3
4
5
6
7
8
9
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
numpad_0
numpad_1
numpad_2
numpad_3
numpad_4
numpad_5
numpad_6
numpad_7
numpad_8
numpad_9
multiply_key
add_key
separator_key <-- '|' also known as the 'pipe'
|
subtract_key
decimal_key
divide_key
f1
f2
f3
f4
f5
f6
f7
f8
f9
f10
f11
f12
f13
f14
f15
f16
f17
f18
f19
f20
f21
f22
f23
f24
num_lock
scroll_lock
left_shift
right_shift
left_control
right_control
left_menu
right_menu
browser_back
browser_forward
browser_refresh
browser_stop
browser_search
browser_favorites
browser_start_and_home
volume_mute
volume_Down
volume_up
next_track
previous_track
stop_media
play/pause_media
start_mail
select_media
start_application_1
start_application_2
attn_key
crsel_key
exsel_key
play_key
zoom_key
clear_key
+
,
-
.
/
`
;
[
\
]
'
`
```
Change Log
==========
0.1.7 (4/23/2024)
-----------------
- Support added for specifying keycodes directly inside of keybindings.
0.1.6 (6/21/2023)
-----------------
- Changelog updated.
0.1.5 (6/21/2023)
-----------------
- Minor fix to the register_hotkey function.
0.1.4 (6/21/2023)
-----------------
- Added optional press and release callback parameter differentiation. Merged fix for press callback function.
0.1.3 (5/28/2023)
-----------------
- Implemented retrofitting for the original hotkey style: e.g. ["control", "alt", "z"]. This is converted automatically to "control + alt + z".
0.1.2 (5/28/2023)
-----------------
- Added dict binding format support. Also added support for supplying callback parameters for bindings.
0.1.1 (5/28/2023)
-----------------
- Added syntax update warning for anyone still using the old hotkey binding syntax. Updated the singular register_hotkey function.
0.1.0 (5/28/2023)
-----------------
- Code refactoring. Hotkey formatting is updated. Key chord sequences now supported. Now providing option to actuate release callback either on partial release of the last key chord, or on full release of all keys in the last keychord (though if the windows modifier key is used, unfortunately it still just actuates immediately on partial release).
0.0.6 (5/27/2023)
-----------------
- Fixed window key detection.
0.0.5 (5/27/2023)
-----------------
- Fixed unwanted modifier keys bug. Added pywin32 as dependency.
0.0.4 (12/1/2020)
-----------------
- Fixed Development Status: It's now set to Beta.
0.0.3 (12/1/2020)
-----------------
- Readme update: Added some clarification in the example usage.
0.0.2 (12/1/2020)
-----------------
- Readme update.
0.0.1 (12/1/2020)
-----------------
- First Release
Raw data
{
"_id": null,
"home_page": "https://github.com/btsdev",
"name": "global-hotkeys",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "hotkeys, shortcuts",
"author": "btsdev",
"author_email": "btsdevman@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/d3/de/8c07714cd55c72e57a44059aaba43bd1b347e989b18a19012ad4764978a8/global_hotkeys-0.1.7.tar.gz",
"platform": null,
"description": "# Python Global Hotkey Bindings for Windows\r\n\r\nUse this library to set system wide keybindings for your code to respond to.\r\n\r\n## Installation\r\n\r\n```\r\npip install global-hotkeys -U\r\n```\r\n\r\n## Example usage\r\n\r\n```python\r\nfrom global_hotkeys import *\r\n\r\nimport time\r\n\r\n# Flag to indicate whether the program should continue running.\r\nis_alive = True\r\n\r\ndef print_hello():\r\n print(\"Hello\")\r\n\r\ndef print_world():\r\n print(\"World\")\r\n\r\ndef print_foo():\r\n print(\"Foo\")\r\n\r\ndef print_bar():\r\n print(\"Bar\")\r\n\r\ndef print_with_params(params):\r\n print(params[\"test\"])\r\n\r\ndef press_with_params(params):\r\n print(params[\"press_param\"])\r\n\r\ndef release_with_params(params):\r\n print(params[\"release_param\"])\r\n\r\ndef exit_application():\r\n global is_alive\r\n print(\"exiting\")\r\n stop_checking_hotkeys()\r\n is_alive = False\r\n\r\n\r\n# Declare some key bindings.\r\nbindings = [\r\n [\"control + 7, control + 4\", None, print_world, True],\r\n # You can use direct keycodes as well (useful for non-US keyboard layouts):\r\n [\"control + 0x35\", None, print_hello, False], # 0x35 is the keycode for the '5' key\r\n [\"control + 6\", None, print_with_params, False, {\"test\":5}],\r\n [\r\n \"control + 8\", \r\n press_with_params, \r\n release_with_params, \r\n False, \r\n {\"press_param\":\"pressed!\"}, \r\n {\"release_param\": \"released!\"}\r\n ],\r\n # dict style\r\n {\r\n \"hotkey\": \"control + 4\",\r\n \"on_press_callback\": None,\r\n \"on_release_callback\": print_with_params,\r\n \"actuate_on_partial_release\": False,\r\n \"callback_params\": {\"test\": \"testing\"},\r\n\r\n },\r\n # dict style with differentiating params for press and release callbacks\r\n {\r\n \"hotkey\": \"control + 9\",\r\n \"on_press_callback\": press_with_params,\r\n \"on_release_callback\": release_with_params,\r\n \"actuate_on_partial_release\": False,\r\n \"press_callback_params\": {\"press_param\":\"ctrl+9 pressed!\"},\r\n \"release_callback_params\": {\"release_param\": \"ctrl+9 released!\"},\r\n\r\n },\r\n\r\n [\"window + 1\", None, print_foo, False],\r\n [\"t,m\", None, print_bar, False],\r\n [\"control + Q\", None, exit_application, False],\r\n]\r\n\r\n# Bindings take on the form of:\r\n# <binding>, on_press_callback, on_release_callback, actuate_on_partial_release_flag, callback_params\r\n#\r\n# *Note that callback_params will be passed to both press and release callback functions\r\n#\r\n# Or in explicit dict format:\r\n# {\r\n# \"hotkey\": <binding>,\r\n# \"on_press_callback\": <press_callback>,\r\n# \"on_release_callback\": <release_callback>,\r\n# \"actuate_on_partial_release\": False | True,\r\n# \"callback_params\": <a variable or expression can go here> <-- This applies to both callbacks.\r\n# \"press_callback_params\": <a variable or expression can go here>\r\n# \"release_callback_params\": <a variable or expression can go here>\r\n# }\r\n\r\n# It's useful to have 'actuate_on_partial_release_flag' set to False, \r\n# so your modifier keys don't get in the way of any automatic keyboard output you're doing in response.\r\n\r\n# Note the actual hotkey syntax. Key combinations are denoted via the '+' character, \r\n# and additional key chords are separated by commas. Spaces are ignored.\r\n\r\n# Register all of our keybindings\r\nregister_hotkeys(bindings)\r\n\r\n# Finally, start listening for keypresses\r\nstart_checking_hotkeys()\r\n\r\n# Keep waiting until the user presses the exit_application keybinding.\r\n# Note that the hotkey listener will exit when the main thread does.\r\nwhile is_alive:\r\n time.sleep(0.1)\r\n```\r\n\r\n## Explanation of the binding structure\r\n\r\nLet's go in more details on how the binding is structured, You have two options either to declare the binding explicitly like this within curly brackets:\r\n```\r\n# {\r\n# \"hotkey\": <binding>,\r\n# \"on_press_callback\": <press_callback>,\r\n# \"on_release_callback\": <release_callback>,\r\n# \"actuate_on_partial_release\": False | True,\r\n# \"callback_params\": 1ms\": <a variable or expression can go here>\r\n# \"release_callback_params\": <a variable or expression can go here>\r\n# }\r\n```\r\n\r\nOr implicitly by the position of the parameter:\r\n```\r\n[\"hotkey\", on_press_callback, on_release_callback, actuate_on_partial_release,press_callback_params,release_callback_params]\r\n```\r\n- **hotkey:** A string representing the key combination that triggers the callbacks, such as \"control + 7, control + 4\".\r\n- **on_press_callback:** The function to be called when the hotkey is pressed. Can be None or a function reference.\r\n- **on_release_callback:** The function to be called when the hotkey is released. Can be None or a function reference.\r\n- **actuate_on_partial_release:** A boolean indicating whether the release callback should be triggered on a partial release of the key combination.\r\n- **callback_params:** Parameters to be passed to both the press and release callbacks. This should be a dictionary.\r\n- **press_callback_params, release_callback_params:** Parameters specifically for the press,release callbacks. This should be a dictionary (key-value pairs Like in this example ```\"press_callback_params\": {\"press_param\":\"ctrl+9 pressed!\"}```) .\r\n\r\n## If you are on a non-US keyboard layout...\r\nYou may need to manually figure out the keycodes for the keys you want to bind to, and use those keycodes directly instead of the keynames in your bindings. I've included a useful utility for doing so. \r\n\r\nJust open an interactive shell, and import my keycode_checker module to begin figuring out what your desired keys' keycodes are.\r\n```python\r\n>>> from global_hotkeys import keycode_checker\r\n```\r\nYou'll see the `Press any key (Ctrl+C to exit)` prompt and can begin pressing keys until you've gathered your desired keycodes:\r\n```\r\nKey pressed: a\r\nVK Code: 0x1E\r\nKey pressed: b\r\nVK Code: 0x30\r\n```\r\n\r\nAnd in your code that's actually setting up keybindings maybe you'd use something like:\r\n```python\r\n# Assume our previous example setup code from above\r\nbindings = [\r\n [\"control + 0x1E\", None, print_hello, False],\r\n # whatever other bindings...\r\n]\r\n```\r\n\r\nThat said, if your modifier keys' keycodes (e.g. for control, shift, alt) are different than what's listed in [keycodes.py](https://github.com/btsdev/global_hotkeys/blob/master/global_hotkeys/keycodes.py), you'll likely need to just fork this project and modify the source to make things work. CD into your forked copy of the repos and use `pip install -e ./` to apply your changes as you experiment and use your forked version of the library instead. Certainly not a perfect solution, admittedly...\r\n\r\nAs the code needs to differentiate between modifier keys and non-modifier keys, some further update may be necessary to allow for changing/specifying modifier keycodes as well for non-US keyboard layouts.\r\n\r\n## Also note that I've included a simple global snippets example using this functionality.\r\nIt's in the `tests` folder if you download this project's source from [GitHub](https://github.com/btsdev/global_hotkeys).\r\n\r\nIt's the file `global_snippets.py` and it demonstrates toggling on and off global snippets using a hotkey, and using key chords to inject snippets, in this case the current date time. This is a nod to a user who emailed regarding the addition of this functionality.\r\n\r\nIt achieves this by pasting in the current date time to any input field after backspacing to erase the snippet's chord from the input field (careful where you use it though. For faster input of snippets, I relied on just placing the date string into the clipboard and emulating CTRL+V to paste).\r\n\r\nAlso, it uses the winsound library's Beep function to emit a low and subtle visual cue to indicate whether you just toggled the global snippets on or off.\r\n\r\n### Try setting up and using the Hyperkey to avoid hotkey conflicts with your applications.\r\nI personally use the Hyperkey (which is basically Window+Control+Shift+Alt and also known as the 'OfficeKey' on keyboards that have actually have it) to avoid clashing with most applications' own hotkeys, which is normally not available in windows, but it can be setup using [Autohotkey](https://stackoverflow.com/questions/40435980/how-to-emulate-hyper-key-in-windows-10-using-autohotkey) and also applying the [OfficeKeyFix](https://github.com/anthonyheddings/OfficeKeyFix) which you'll need to compile yourself if one is interested. You can read more about the officekey issue on [Super User](https://superuser.com/questions/1455857/how-to-disable-office-key-keyboard-shortcut-opening-office-app). I personally mapped it to my right control key instead of the capslock key; it was just a simple edit to the Autohotkey script. Both of these I placed in my windows startup folder, and then I was all set.\r\n\r\n## Additional functionality\r\n\r\nYou may also add/remove keybindings one at a time, in bulk, or completely clear them all out (which also stops the hotkey listener thread).\r\n\r\n```python\r\n\r\n# Just reusing our bindings declaration from above (this is not a complete code example, btw).\r\nbindings = [\r\n [\"control + 7, control + 4\", None, print_world, True],\r\n [\"control + 5\", None, print_hello, False],\r\n [\"window + 1\", None, print_foo, False],\r\n [\"t,m\", None, print_bar, False],\r\n [\"control + Q\", None, exit_application, False],\r\n]\r\n\r\n# Register a single keybinding (if it's not already registered). \r\n# Returns True if the key didn't already exist and was added, \r\n# else False (the binding is already registered - remove it first if \r\n# you wish to overwrite it with new event handlers).\r\nregister_hotkey(bindings[0])\r\n\r\n# Remove a single keybinding (if it exists). \r\n# Returns True if the key existed and was removed, else False (the binding is already gone).\r\nremove_hotkey(bindings[0])\r\n\r\n# Register a list of keybindings.\r\nregister_hotkeys(bindings)\r\n\r\n# Remove a list of keybindings.\r\nremove_hotkeys(bindings)\r\n\r\n# Remove all keybindings and terminate the hotkey listener thread.\r\nclear_hotkeys()\r\n```\r\n\r\n## List of the available keys\r\n\r\n```\r\nbackspace\r\ntab\r\nclear\r\nenter\r\nshift\r\ncontrol\r\nalt\r\npause\r\ncaps_lock\r\nescape\r\nspace\r\npage_up\r\npage_down\r\nleft_window\r\nright_window\r\nwindow\r\nend\r\nhome\r\nleft\r\nup\r\nright\r\ndown\r\nselect\r\nprint\r\nexecute\r\nenter\r\nprint_screen\r\ninsert\r\ndelete\r\nhelp\r\n0\r\n1\r\n2\r\n3\r\n4\r\n5\r\n6\r\n7\r\n8\r\n9\r\na\r\nb\r\nc\r\nd\r\ne\r\nf\r\ng\r\nh\r\ni\r\nj\r\nk\r\nl\r\nm\r\nn\r\no\r\np\r\nq\r\nr\r\ns\r\nt\r\nu\r\nv\r\nw\r\nx\r\ny\r\nz\r\nnumpad_0\r\nnumpad_1\r\nnumpad_2\r\nnumpad_3\r\nnumpad_4\r\nnumpad_5\r\nnumpad_6\r\nnumpad_7\r\nnumpad_8\r\nnumpad_9\r\nmultiply_key\r\nadd_key\r\nseparator_key <-- '|' also known as the 'pipe'\r\n|\r\nsubtract_key\r\ndecimal_key\r\ndivide_key\r\nf1\r\nf2\r\nf3\r\nf4\r\nf5\r\nf6\r\nf7\r\nf8\r\nf9\r\nf10\r\nf11\r\nf12\r\nf13\r\nf14\r\nf15\r\nf16\r\nf17\r\nf18\r\nf19\r\nf20\r\nf21\r\nf22\r\nf23\r\nf24\r\nnum_lock\r\nscroll_lock\r\nleft_shift\r\nright_shift\r\nleft_control\r\nright_control\r\nleft_menu\r\nright_menu\r\nbrowser_back\r\nbrowser_forward\r\nbrowser_refresh\r\nbrowser_stop\r\nbrowser_search\r\nbrowser_favorites\r\nbrowser_start_and_home\r\nvolume_mute\r\nvolume_Down\r\nvolume_up\r\nnext_track\r\nprevious_track\r\nstop_media\r\nplay/pause_media\r\nstart_mail\r\nselect_media\r\nstart_application_1\r\nstart_application_2\r\nattn_key\r\ncrsel_key\r\nexsel_key\r\nplay_key\r\nzoom_key\r\nclear_key\r\n+\r\n,\r\n-\r\n.\r\n/\r\n`\r\n;\r\n[\r\n\\\r\n]\r\n'\r\n`\r\n```\r\n\r\n\r\nChange Log\r\n==========\r\n\r\n0.1.7 (4/23/2024)\r\n-----------------\r\n- Support added for specifying keycodes directly inside of keybindings.\r\n\r\n0.1.6 (6/21/2023)\r\n-----------------\r\n- Changelog updated.\r\n\r\n0.1.5 (6/21/2023)\r\n-----------------\r\n- Minor fix to the register_hotkey function.\r\n\r\n0.1.4 (6/21/2023)\r\n-----------------\r\n- Added optional press and release callback parameter differentiation. Merged fix for press callback function.\r\n\r\n0.1.3 (5/28/2023)\r\n-----------------\r\n- Implemented retrofitting for the original hotkey style: e.g. [\"control\", \"alt\", \"z\"]. This is converted automatically to \"control + alt + z\".\r\n\r\n0.1.2 (5/28/2023)\r\n-----------------\r\n- Added dict binding format support. Also added support for supplying callback parameters for bindings.\r\n\r\n0.1.1 (5/28/2023)\r\n-----------------\r\n- Added syntax update warning for anyone still using the old hotkey binding syntax. Updated the singular register_hotkey function.\r\n\r\n0.1.0 (5/28/2023)\r\n-----------------\r\n- Code refactoring. Hotkey formatting is updated. Key chord sequences now supported. Now providing option to actuate release callback either on partial release of the last key chord, or on full release of all keys in the last keychord (though if the windows modifier key is used, unfortunately it still just actuates immediately on partial release).\r\n\r\n0.0.6 (5/27/2023)\r\n-----------------\r\n- Fixed window key detection.\r\n\r\n0.0.5 (5/27/2023)\r\n-----------------\r\n- Fixed unwanted modifier keys bug. Added pywin32 as dependency.\r\n\r\n0.0.4 (12/1/2020)\r\n-----------------\r\n- Fixed Development Status: It's now set to Beta.\r\n\r\n0.0.3 (12/1/2020)\r\n-----------------\r\n- Readme update: Added some clarification in the example usage.\r\n\r\n0.0.2 (12/1/2020)\r\n-----------------\r\n- Readme update.\r\n\r\n0.0.1 (12/1/2020)\r\n-----------------\r\n- First Release\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": null,
"version": "0.1.7",
"project_urls": {
"Homepage": "https://github.com/btsdev"
},
"split_keywords": [
"hotkeys",
" shortcuts"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d3de8c07714cd55c72e57a44059aaba43bd1b347e989b18a19012ad4764978a8",
"md5": "786b6062eb5e9179f03ced482fe0e0c0",
"sha256": "6546d7a2ea2da6e646871b48dea47d231d66ec2982641f30bf83a2f7a2a2b249"
},
"downloads": -1,
"filename": "global_hotkeys-0.1.7.tar.gz",
"has_sig": false,
"md5_digest": "786b6062eb5e9179f03ced482fe0e0c0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 18047,
"upload_time": "2024-04-23T07:40:10",
"upload_time_iso_8601": "2024-04-23T07:40:10.743072Z",
"url": "https://files.pythonhosted.org/packages/d3/de/8c07714cd55c72e57a44059aaba43bd1b347e989b18a19012ad4764978a8/global_hotkeys-0.1.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-23 07:40:10",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "global-hotkeys"
}