Add in-app search for subjects, lessons and exercises.

The header magnifier and Cmd/Ctrl+K open a palette that jumps straight to a matching page.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
pepaskopec-blip 2026-09-17 19:08:54 +02:00
commit cafa18b189
8 changed files with 658 additions and 5 deletions

View file

@ -87,6 +87,18 @@ gboolean on_window_key_pressed(GtkEventControllerKey *controller,
return GDK_EVENT_STOP;
}
if (search_is_open() && keyval == GDK_KEY_Escape) {
search_close();
return GDK_EVENT_STOP;
}
if ((keyval == GDK_KEY_k || keyval == GDK_KEY_K ||
keyval == GDK_KEY_f || keyval == GDK_KEY_F) &&
(state & (GDK_CONTROL_MASK | GDK_SUPER_MASK | GDK_META_MASK)) != 0) {
search_open();
return GDK_EVENT_STOP;
}
return GDK_EVENT_PROPAGATE;
}