Accept 'j' and 'k' for 'down' and 'up' in CEO menus.
This commit is contained in:
parent
1e1529567f
commit
697c1dda33
|
@ -381,11 +381,11 @@ def menu(wnd, offy, offx, width, options, _acquire_wnd=None):
|
||||||
keypress = wnd.getch()
|
keypress = wnd.getch()
|
||||||
|
|
||||||
# UP moves to the previous option
|
# UP moves to the previous option
|
||||||
if keypress == curses.KEY_UP and selected > 0:
|
if (keypress == curses.KEY_UP or keypress == ord('k')) and selected > 0:
|
||||||
selected = (selected - 1)
|
selected = (selected - 1)
|
||||||
|
|
||||||
# DOWN moves to the next option
|
# DOWN moves to the next option
|
||||||
elif keypress == curses.KEY_DOWN and selected < len(options) - 1:
|
elif (keypress == curses.KEY_DOWN or keypress == ord('j')) and selected < len(options) - 1:
|
||||||
selected = (selected + 1)
|
selected = (selected + 1)
|
||||||
|
|
||||||
# RETURN runs the callback for the selected option
|
# RETURN runs the callback for the selected option
|
||||||
|
|
Loading…
Reference in New Issue