]> CRI, Mines Paris - PSL - minwii.git/blobdiff - src/minwii/widgets/instrumentselector.py
Ajout de la propriété « duration » sur l'objet musicxml.Part. Modification dans le...
[minwii.git] / src / minwii / widgets / instrumentselector.py
index 68616436103b17a2bbde61faba9bf61b9421c2c6..52799d01f69c97dab2a3f2623769b0ccba709f08 100755 (executable)
@@ -7,14 +7,14 @@ $URL$
 """
 import os.path
 import pygame
-from eventutils import event_handler, EventDispatcher, EventHandlerMixin
+from minwii.eventutils import event_handler, EventDispatcher, EventHandlerMixin
+from minwii.config import FRAMERATE
+from minwii.config import  INSTRUMENTS
+from minwii.globals import BACKGROUND_LAYER
+from minwii.globals import FOREGROUND_LAYER
+from minwii.globals import CURSOR_LAYER
+from minwii.globals import hls_to_rgba_8bits
 from cursors import WarpingCursor
-from config import FRAMERATE
-from config import  INSTRUMENTS
-from globals import BACKGROUND_LAYER
-from globals import FOREGROUND_LAYER
-from globals import CURSOR_LAYER
-from globals import hls_to_rgba_8bits
 
 
 class InstrumentSelector(pygame.sprite.LayeredDirty, EventHandlerMixin) :
@@ -72,7 +72,8 @@ class InstrumentSelector(pygame.sprite.LayeredDirty, EventHandlerMixin) :
 
     @event_handler(pygame.KEYDOWN)       
     def handleKeyDown(self, event) :
-        if event.key == pygame.K_q:
+        if event.key in (pygame.K_q, pygame.K_ESCAPE) or \
+            event.unicode == u'q' :
             self.stop()
 
     @event_handler(pygame.MOUSEMOTION)