# HG changeset patch # User Goffi # Date 1523640575 -7200 # Node ID 05d602be0120e099c302cc7f6b1e6535b5f46536 # Parent d276cfec38e85fc0a1853da2d2d224866edd6cab core: [esc] key handling is disabled (for now) diff -r d276cfec38e8 -r 05d602be0120 cagou/core/cagou_main.py --- a/cagou/core/cagou_main.py Fri Apr 13 19:23:59 2018 +0200 +++ b/cagou/core/cagou_main.py Fri Apr 13 19:29:35 2018 +0200 @@ -227,6 +227,7 @@ """Kivy App for Cagou""" def build(self): + Window.bind(on_keyboard=self.key_input) return CagouRootWidget(Label(text=u"Loading please wait")) def showWidget(self): @@ -272,6 +273,13 @@ self.cagou_status.flush() self.cagou_status_fd.close() + def key_input(self, window, key, scancode, codepoint, modifier): + # we disable [esc] handling, because default action is to quit app + if key == 27: + return True + else: + return False + class Cagou(QuickApp): MB_HANDLE = False