From: Armaan Bhojwani Date: Sat, 13 Feb 2021 20:20:14 +0000 (-0500) Subject: Add quit_key option X-Git-Tag: v0.7.0~23 X-Git-Url: https://git.armaanb.net/?p=lightcards.git;a=commitdiff_plain;h=4d92363ae6e59e08aab84b017356cb70aae831eb Add quit_key option --- diff --git a/config.py b/config.py index 32b75ef..6cd69a3 100644 --- a/config.py +++ b/config.py @@ -40,6 +40,8 @@ view_one = "1" view_two = "2" view_three = "3" +quit_key = "q" + ############################################################################### # OTHER diff --git a/lightcards/display.py b/lightcards/display.py index e91fed1..bce533a 100644 --- a/lightcards/display.py +++ b/lightcards/display.py @@ -474,7 +474,7 @@ class Display: while True: self.check_size() key = self.win.getkey() - if key == "q": + if key == self.config["quit_key"]: self.leave() elif key in self.config["card_prev"]: self.obj.back()