diff --git a/README.rst b/README.rst index 45de1ff..b8f6717 100644 --- a/README.rst +++ b/README.rst @@ -9,13 +9,11 @@ Currently no mac or python2 support :( Installation ------------ -the old - .. code-block:: bash - pip3 install system_hotkey + pip install . --user -should do the trick +in the root folder Windows ^^^^^^^ diff --git a/system_hotkey/system_hotkey.py b/system_hotkey/system_hotkey.py index 1283ca0..ac33ae6 100644 --- a/system_hotkey/system_hotkey.py +++ b/system_hotkey/system_hotkey.py @@ -2,7 +2,7 @@ import _thread as thread import queue import time -import collections +import collections.abc from pprint import pprint import struct @@ -61,6 +61,8 @@ class InvalidKeyError(SystemHotkeyError):pass '7':0x37, '8':0x38, '9':0x39, + "grave": 0xC0, + "`": 0xC0, "up": win32con.VK_UP , "kp_up": win32con.VK_UP , "down": win32con.VK_DOWN @@ -125,7 +127,6 @@ class InvalidKeyError(SystemHotkeyError):pass , "f23": win32con.VK_F23 , "f24": win32con.VK_F24 , "media_play_pause": win32con.VK_MEDIA_PLAY_PAUSE - , "media_stop": win32con.VK_MEDIA_STOP , "media_next": win32con.VK_MEDIA_NEXT_TRACK , "media_previous": win32con.VK_MEDIA_PREV_TRACK } @@ -285,7 +286,7 @@ def register(self, hotkey, *args, callback=None, overwrite=False): thread safe ''' - assert isinstance(hotkey, collections.Iterable) and type(hotkey) not in (str, bytes) + assert isinstance(hotkey, collections.abc.Iterable) and type(hotkey) not in (str, bytes) if self.consumer == 'callback' and not callback: raise TypeError('Function register requires callback argument in non sonsumer mode')