Fix general prompt input.

This commit is contained in:
Aldo Cortesi 2015-03-20 11:00:24 +13:00
parent 560e44c637
commit 558e0a41c2
2 changed files with 11 additions and 0 deletions

View File

@ -555,6 +555,9 @@ class ConsoleMaster(flow.FlowMaster):
self.prompt_execute(k)
elif k == "enter":
self.prompt_execute()
else:
if common.is_keypress(k):
self.view.keypress(self.loop.screen_size, k)
else:
k = self.view.keypress(self.loop.screen_size, k)
if k:

View File

@ -31,6 +31,14 @@ METHOD_OPTIONS = [
]
def is_keypress(k):
"""
Is this input event a keypress?
"""
if isinstance(k, basestring):
return True
def highlight_key(s, k):
l = []
parts = s.split(k, 1)