From 3c10e656308bd0f29d8ac4d15f7f95f29aec1697 Mon Sep 17 00:00:00 2001 From: pin Date: Mon, 6 Sep 2010 11:42:39 +0000 Subject: [PATCH] =?utf8?q?Prise=20en=20charge=20de=20la=20touche=20=C2=AB?= =?utf8?q?=C2=A0esc=C2=A0=C2=BB=20pour=20quitter=20les=20=C3=A9crans=20de?= =?utf8?q?=20s=C3=A9lectien=20d'instruments=20ou=20de=20jeu.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.cri.ensmp.fr/svn/minwii/trunk@313 fe552daf-6dbe-4428-90eb-1537e0879342 --- src/minwii/widgets/instrumentselector.py | 4 +++- src/minwii/widgets/playingscreen.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/minwii/widgets/instrumentselector.py b/src/minwii/widgets/instrumentselector.py index f2ef178..403f3bc 100755 --- a/src/minwii/widgets/instrumentselector.py +++ b/src/minwii/widgets/instrumentselector.py @@ -72,7 +72,9 @@ class InstrumentSelector(pygame.sprite.LayeredDirty, EventHandlerMixin) : @event_handler(pygame.KEYDOWN) def handleKeyDown(self, event) : - if event.key == pygame.K_q: + if event.key == pygame.K_q or \ + event.unicode == u'q' or \ + pygame.K_ESCAPE: self.stop() @event_handler(pygame.MOUSEMOTION) diff --git a/src/minwii/widgets/playingscreen.py b/src/minwii/widgets/playingscreen.py index adb6981..66c4776 100755 --- a/src/minwii/widgets/playingscreen.py +++ b/src/minwii/widgets/playingscreen.py @@ -100,7 +100,9 @@ class PlayingScreenBase(pygame.sprite.LayeredDirty, EventHandlerMixin) : @event_handler(pygame.KEYDOWN) def handleKeyDown(self, event) : - if event.key == pygame.K_q or event.unicode == u'q': + if event.key == pygame.K_q or \ + event.unicode == u'q' or \ + pygame.K_ESCAPE: self.stop() @event_handler(pygame.MOUSEBUTTONDOWN) -- 2.20.1