From 8d942ddfc5edc0e388206ca489fa386dd80a2ce2 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Sat, 30 Jan 2021 23:02:31 -0500 Subject: [PATCH] Add keybindings to go to start and end of stack --- lightcards/display.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lightcards/display.py b/lightcards/display.py index a4d6f2b..aa331b1 100755 --- a/lightcards/display.py +++ b/lightcards/display.py @@ -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) -- 2.39.2