equal
deleted
inserted
replaced
23 app.root_window.add(button1) |
23 app.root_window.add(button1) |
24 app.root_window.add(button2) |
24 app.root_window.add(button2) |
25 app.root_window.add(field) |
25 app.root_window.add(field) |
26 app.root_window.focus_widget = field |
26 app.root_window.focus_widget = field |
27 |
27 |
28 def on_keypress(keyname, char, mod): |
28 def on_keypress(ev): |
29 if keyname == 'escape': |
29 if ev.keyname == 'escape': |
30 app.stop() |
30 app.stop() |
31 |
31 |
32 app.window_manager.sig_keypress.connect(on_keypress) |
32 app.window_manager.sig_keypress.connect(on_keypress) |
33 |
33 |
34 app.start() |
34 app.start() |