feat(pwsp-gui): slash now toggles search focus

This commit is contained in:
2026-02-25 00:12:50 +03:00
parent a7dd0b97d1
commit 8126efe8d9
+7 -1
View File
@@ -47,7 +47,13 @@ impl SoundpadGui {
// Focus search field // Focus search field
if self.key_pressed(ctx, Key::Slash) { if self.key_pressed(ctx, Key::Slash) {
self.app_state.force_focus_search = true; if search_focused {
ctx.memory_mut(|m| {
m.request_focus(Id::NULL);
});
} else {
self.app_state.force_focus_search = true;
}
} }
// Play selected file on Enter // Play selected file on Enter