timeyyy/system_hotkey

Loss of binding

Closed this issue · 11 comments

I haven't noticed this on windows but occasionally on Ububtu 16.04 registered hotkeys become unbound after an unrepeatable period of time or some action I can't determine, for lack of knowing the cause of the issue I was hoping you could implement a function that can quickly check to see if the hotkey is still bound. Thanks!

Does it happen only on any specific keys? Are you usibg the xcb or xlib bindings? Is there an error or does it just stop sending events?

I've mostly been using the f keys, f2 f7 f8, probably from xlib and all of them seem to stop, i didn't see an error but nothing else seemed to act abnormally in my script other than the hotkey not making the callback, i'll try and figure out more if I can and I'll let you know if I do, thanks.

no need to close the issue until a pull request or solution is presented

Got an error:
Unhandled exception in thread started by <function SystemHotkey.init..thread_me at 0x7fc1f041cea0>
Traceback (most recent call last):
File "system_hotkey/system_hotkey.py", line 572, in thread_me
File "system_hotkey/system_hotkey.py", line 440, in parse_event
AttributeError: 'MappingNotifyEvent' object has no attribute 'state'

Trying use_xlib=False, verbose=1 and seeing if the issue persists and if I get any additional information.

perfect, I'll dig into this after the 29th.

This time without xlib and with verbose output:

Unhandled exception in thread started by <function SystemHotkey.init..thread_me at 0x7f251bfeb048>
Traceback (most recent call last):
File "/home/noah/.local/lib/python3.5/site-packages/system_hotkey/system_hotkey.py", line 572, in thread_me
hotkey = self.parse_event(event)
File "/home/noah/.local/lib/python3.5/site-packages/system_hotkey/system_hotkey.py", line 440, in parse_event
hotkey += self.get_modifiersym(event.state)
AttributeError: 'MappingNotifyEvent' object has no attribute 'state'

Could it be throwing the errror only when you have a modifyer/ capslock/ numlock set? What key combinations are you experiencing the problem with

I did have NumLock on, I was using just f2, f7, f8 with no modifiers, thanks.

It should be fixed now, it wasn't just numlock but if you turned scroll lock on etc. Thank you for reporting

I will re upload to pypi

you know, i bet it was my wireless keyboard reconnecting now that i think about it