]> git.armaanb.net Git - lightcards.git/commitdiff
Remove enter key keybinding to quit
authorArmaan Bhojwani <me@armaanb.net>
Sun, 31 Jan 2021 03:53:28 +0000 (22:53 -0500)
committerArmaan Bhojwani <me@armaanb.net>
Sun, 31 Jan 2021 03:53:28 +0000 (22:53 -0500)
lightcards/display.py

index a4e562682402dda9e3023abf38a257f009e0e50e..4dab9e1ad47a1e533a79c300c0ce1a674fe88b95 100755 (executable)
@@ -2,9 +2,6 @@
 # Armaan Bhojwani 2021
 
 import curses
-import os
-
-from .deck import Status
 
 
 def disp_bar(stdscr, stack, headers, obj):
@@ -35,7 +32,7 @@ def disp_menu(stdscr, stack, headers, idx):
                   "[r]estart, [s]tarred only, [u]nstar all and restart, [q]uit")
     while True:
         key = stdscr.getkey()
-        if key == "q" or key == os.linesep:
+        if key == "q":
             exit(0)
         elif key == "r":
             idx.setIdx(0)
@@ -80,7 +77,7 @@ def get_key(stdscr, stack, headers, idx):
 
     while True:
         key = stdscr.getkey()
-        if key == "q" or key == os.linesep:
+        if key == "q":
             exit(0)
         elif key in ["l", "KEY_LEFT"]:
             idx.forward(stack)