diff options
Diffstat (limited to 'music_sampler/mapping.py')
-rw-r--r-- | music_sampler/mapping.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/music_sampler/mapping.py b/music_sampler/mapping.py index 0d58d30..74feec8 100644 --- a/music_sampler/mapping.py +++ b/music_sampler/mapping.py | |||
@@ -124,11 +124,16 @@ class Mapping(RelativeLayout): | |||
124 | threading.Thread(name="MSKeyAction", target=key.run, | 124 | threading.Thread(name="MSKeyAction", target=key.run, |
125 | args=['-'.join(modifiers)]).start() | 125 | args=['-'.join(modifiers)]).start() |
126 | elif 'ctrl' in modifiers and (keycode[0] == 113 or keycode[0] == '99'): | 126 | elif 'ctrl' in modifiers and (keycode[0] == 113 or keycode[0] == '99'): |
127 | self.keyboard.unbind(on_key_down=self.on_keyboard_down) | ||
127 | self.stop_all_running() | 128 | self.stop_all_running() |
129 | for music in self.open_files.values(): | ||
130 | music.stop() | ||
128 | for thread in threading.enumerate(): | 131 | for thread in threading.enumerate(): |
129 | if thread.getName()[0:2] != "MS": | 132 | if thread.getName()[0:2] == "MS": |
130 | continue | 133 | thread.join() |
131 | thread.join() | 134 | elif thread.__class__ == threading.Timer: |
135 | thread.cancel() | ||
136 | thread.join() | ||
132 | 137 | ||
133 | sys.exit() | 138 | sys.exit() |
134 | elif 'ctrl' in modifiers and keycode[0] == 114: | 139 | elif 'ctrl' in modifiers and keycode[0] == 114: |