comparison cagou/core/cagou_main.py @ 143:05d602be0120

core: [esc] key handling is disabled (for now)
author Goffi <goffi@goffi.org>
date Fri, 13 Apr 2018 19:29:35 +0200
parents d276cfec38e8
children b9fd83292fc4
comparison
equal deleted inserted replaced
142:d276cfec38e8 143:05d602be0120
225 225
226 class CagouApp(App): 226 class CagouApp(App):
227 """Kivy App for Cagou""" 227 """Kivy App for Cagou"""
228 228
229 def build(self): 229 def build(self):
230 Window.bind(on_keyboard=self.key_input)
230 return CagouRootWidget(Label(text=u"Loading please wait")) 231 return CagouRootWidget(Label(text=u"Loading please wait"))
231 232
232 def showWidget(self): 233 def showWidget(self):
233 self._profile_manager = ProfileManager() 234 self._profile_manager = ProfileManager()
234 self.root.changeWidget(self._profile_manager) 235 self.root.changeWidget(self._profile_manager)
270 if sys.platform == "android": 271 if sys.platform == "android":
271 self.cagou_status[0] = 'S' 272 self.cagou_status[0] = 'S'
272 self.cagou_status.flush() 273 self.cagou_status.flush()
273 self.cagou_status_fd.close() 274 self.cagou_status_fd.close()
274 275
276 def key_input(self, window, key, scancode, codepoint, modifier):
277 # we disable [esc] handling, because default action is to quit app
278 if key == 27:
279 return True
280 else:
281 return False
282
275 283
276 class Cagou(QuickApp): 284 class Cagou(QuickApp):
277 MB_HANDLE = False 285 MB_HANDLE = False
278 286
279 def __init__(self): 287 def __init__(self):