# HG changeset patch # User Björn Ricks # Date 1365182973 -7200 # Node ID 3fa4ab9146ddb7574050a3ab598b8cba31016d7b # Parent 9f85ffa0a2f6a67ebc59bccfde4a6b1f323a533a Implement three phase user input handling First the state is able to filter keys. Afterwards the MainLoop widget is allowed to act on keypress. At last the state is allowed to react on keys. diff -r 9f85ffa0a2f6 -r 3fa4ab9146dd getan/controller.py --- a/getan/controller.py Fri Apr 05 19:18:24 2013 +0200 +++ b/getan/controller.py Fri Apr 05 19:29:33 2013 +0200 @@ -52,7 +52,9 @@ self.view.loop.screen_size = None self.view.loop.draw_screen() else: - self.state = self.state.keypress(input) + input = self.state.input_filter(input, raw_input) + self.loop.process_input(input) + self.state.handle_input(input) def load_projects(self): projects = self.backend.load_projects()