From 4655b69a60ac2bb41820dfa8f983666c38258b47 Mon Sep 17 00:00:00 2001 From: mecaneer23 Date: Thu, 20 Jun 2024 09:09:33 -0500 Subject: [PATCH] feat: allow searching using ctrl+f --- src/keys.py | 1 + todo.py | 1 + 2 files changed, 2 insertions(+) diff --git a/src/keys.py b/src/keys.py index 80c6f0c..f23342a 100644 --- a/src/keys.py +++ b/src/keys.py @@ -14,6 +14,7 @@ class Key: nodelay_escape = -1 ctrl_a = 1 + ctrl_f = 6 backspace = 8 tab = 9 enter = 10 diff --git a/todo.py b/todo.py index 69f4639..2969670 100755 --- a/todo.py +++ b/todo.py @@ -489,6 +489,7 @@ def main(stdscr: curses.window) -> int: # make sure it also calls update_file() keys: dict[int, tuple[Callable[..., Todos | None], str]] = { Key.ctrl_a: (selected.multiselect_all, "len(todos)"), + Key.ctrl_f: (search_menu, "stdscr, todos, selected"), Key.backspace: (join_lines, "todos, selected"), Key.backspace_: (join_lines, "todos, selected"), Key.backspace__: (join_lines, "todos, selected"),