From ea5638018783a29685d5739012ec93e08c10d89c Mon Sep 17 00:00:00 2001 From: Matthew Oliver Date: Thu, 8 May 2014 11:03:00 +1000 Subject: [PATCH] Add '?' as another way show help dialog Gertty maps the key to show the help dialog. In gnome-terminal maps to the terminals help, capturing the before it gets to gertty. This change adds an additional help key which will also display the help dialog. Change-Id: I97396c517f21774f0f5c94645169c83b76af2157 --- gertty/app.py | 2 +- gertty/mywid.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gertty/app.py b/gertty/app.py index 66f4d56..e4d0285 100644 --- a/gertty/app.py +++ b/gertty/app.py @@ -223,7 +223,7 @@ class App(object): def unhandledInput(self, key): if key == 'esc': self.backScreen() - elif key == 'f1': + elif key == 'f1' or key == '?': self.help() elif key == 'ctrl q': self.quit() diff --git a/gertty/mywid.py b/gertty/mywid.py index aee227b..ea6cf4d 100644 --- a/gertty/mywid.py +++ b/gertty/mywid.py @@ -17,9 +17,9 @@ import urwid GLOBAL_HELP = """\ Global Keys =========== - Help - Back to previous screen - Quit Gertty + or Help + Back to previous screen + Quit Gertty """ class TextButton(urwid.Button):