Add '?' as another way show help dialog

Gertty maps the <F1> key to show the help dialog. In gnome-terminal
<F1> maps to the terminals help, capturing the <F1> before it
gets to gertty.

This change adds an additional help key <?> which will also display
the help dialog.

Change-Id: I97396c517f21774f0f5c94645169c83b76af2157
This commit is contained in:
Matthew Oliver 2014-05-08 11:03:00 +10:00
parent 53b3bed5bb
commit ea56380187
2 changed files with 4 additions and 4 deletions

View File

@ -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()

View File

@ -17,9 +17,9 @@ import urwid
GLOBAL_HELP = """\
Global Keys
===========
<F1> Help
<ESC> Back to previous screen
<CTRL-Q> Quit Gertty
<F1> or <?> Help
<ESC> Back to previous screen
<CTRL-Q> Quit Gertty
"""
class TextButton(urwid.Button):