From 300b9e8d001260a8000a4876e225ee97ea94c0e8 Mon Sep 17 00:00:00 2001 From: Jake Funke Date: Thu, 13 Dec 2018 22:54:57 +0000 Subject: [PATCH] Added alpine-like q to quit --- menu_screen.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/menu_screen.py b/menu_screen.py index 3f3d6dd..cae9419 100644 --- a/menu_screen.py +++ b/menu_screen.py @@ -270,11 +270,14 @@ class CursedMenu(object): self.screen.clear() self.screen.refresh() - # enter and exit Keys are special cases + # enter, exit, and Q Keys are special cases if user_in == 10: return self.options[self.selected] if user_in == 27: return self.options[-1] + if user_in == 113: + self.selected = len(self.options) - 1 + return # this is a number; check to see if we can set it if user_in >= ord('1') and user_in <= ord(str(min(6,len(self.options)))):