aboutsummaryrefslogtreecommitdiff
path: root/helpers/mapping.py
diff options
context:
space:
mode:
Diffstat (limited to 'helpers/mapping.py')
-rw-r--r--helpers/mapping.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/helpers/mapping.py b/helpers/mapping.py
index b71f3fe..ba2c340 100644
--- a/helpers/mapping.py
+++ b/helpers/mapping.py
@@ -7,7 +7,7 @@ import threading
7import yaml 7import yaml
8import sys 8import sys
9 9
10from .music_file import * 10from .music_file import MusicFile
11from .mixer import Mixer 11from .mixer import Mixer
12from . import Config, gain, error_print 12from . import Config, gain, error_print
13from .action import Action 13from .action import Action
@@ -67,7 +67,7 @@ class Mapping(RelativeLayout):
67 def _on_keyboard_down(self, keyboard, keycode, text, modifiers): 67 def _on_keyboard_down(self, keyboard, keycode, text, modifiers):
68 key = self.find_by_key_code(keycode) 68 key = self.find_by_key_code(keycode)
69 if len(modifiers) == 0 and key is not None: 69 if len(modifiers) == 0 and key is not None:
70 threading.Thread(name="MSKeyAction", target=key.do_actions).start() 70 threading.Thread(name="MSKeyAction", target=key.run).start()
71 elif 'ctrl' in modifiers and (keycode[0] == 113 or keycode[0] == '99'): 71 elif 'ctrl' in modifiers and (keycode[0] == 113 or keycode[0] == '99'):
72 for thread in threading.enumerate(): 72 for thread in threading.enumerate():
73 if thread.getName()[0:2] != "MS": 73 if thread.getName()[0:2] != "MS":
@@ -86,7 +86,7 @@ class Mapping(RelativeLayout):
86 for key in self.children: 86 for key in self.children:
87 if not type(key).__name__ == "Key": 87 if not type(key).__name__ == "Key":
88 continue 88 continue
89 if not key.is_key_ready: 89 if not key.is_loaded_or_failed():
90 return True 90 return True
91 self.ready_color = [0, 1, 0, 1] 91 self.ready_color = [0, 1, 0, 1]
92 return False 92 return False
@@ -95,7 +95,7 @@ class Mapping(RelativeLayout):
95 running = self.running 95 running = self.running
96 self.running = [] 96 self.running = []
97 for (key, start_time) in running: 97 for (key, start_time) in running:
98 key.interrupt_action() 98 key.interrupt()
99 99
100 def start_running(self, key, start_time): 100 def start_running(self, key, start_time):
101 self.running.append((key, start_time)) 101 self.running.append((key, start_time))