comparison cagou/core/cagou_main.py @ 165:e6ec8ff62d87

core: toggle fullscreen on F11
author Goffi <goffi@goffi.org>
date Sat, 28 Apr 2018 12:46:50 +0200
parents a5e8833184c6
children 37220459e93d
comparison
equal deleted inserted replaced
164:60b2b2bad747 165:e6ec8ff62d87
279 279
280 def key_input(self, window, key, scancode, codepoint, modifier): 280 def key_input(self, window, key, scancode, codepoint, modifier):
281 # we disable [esc] handling, because default action is to quit app 281 # we disable [esc] handling, because default action is to quit app
282 if key == 27: 282 if key == 27:
283 return True 283 return True
284 elif key == 292:
285 if not Window.fullscreen:
286 window.fullscreen = 'auto'
287 else:
288 window.fullscreen = False
289 return True
284 else: 290 else:
285 return False 291 return False
286 292
287 293
288 class Cagou(QuickApp): 294 class Cagou(QuickApp):