threading.Thread(name="MSKeyAction", target=key.run,
args=['-'.join(modifiers)]).start()
elif 'ctrl' in modifiers and (keycode[0] == 113 or keycode[0] == '99'):
+ self.keyboard.unbind(on_key_down=self.on_keyboard_down)
self.stop_all_running()
+ for music in self.open_files.values():
+ music.stop()
for thread in threading.enumerate():
- if thread.getName()[0:2] != "MS":
- continue
- thread.join()
+ if thread.getName()[0:2] == "MS":
+ thread.join()
+ elif thread.__class__ == threading.Timer:
+ thread.cancel()
+ thread.join()
sys.exit()
elif 'ctrl' in modifiers and keycode[0] == 114: