]> git.armaanb.net Git - lightcards.git/blobdiff - lightcards/display.py
Add keybindings to go to start and end of stack
[lightcards.git] / lightcards / display.py
index a4d6f2b9237e97c1b30b4bfb8708fa4c2d437212..aa331b107ad12b7a7afb2cbd40d94b1c67953a25 100755 (executable)
@@ -98,3 +98,9 @@ def get_key(stdscr, stack, headers, idx):
         elif key in ["i", "/"]:
             stack[idx.getIdx()].toggleStar()
             disp_card(stdscr, stack, headers, idx)
+        elif key in ["0", "^", "KEY_HOME"]:
+            idx.setIdx(0)
+            disp_card(stdscr, stack, headers, idx)
+        elif key in ["$", "KEY_END"]:
+            idx.setIdx(len(stack) - 1)
+            disp_card(stdscr, stack, headers, idx)