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
+6
View File
@@ -47,8 +47,14 @@ impl SoundpadGui {
// Focus search field // Focus search field
if self.key_pressed(ctx, Key::Slash) { if self.key_pressed(ctx, Key::Slash) {
if search_focused {
ctx.memory_mut(|m| {
m.request_focus(Id::NULL);
});
} else {
self.app_state.force_focus_search = true; self.app_state.force_focus_search = true;
} }
}
// Play selected file on Enter // Play selected file on Enter
if self.key_pressed(ctx, Key::Enter) && self.app_state.selected_file.is_some() { if self.key_pressed(ctx, Key::Enter) && self.app_state.selected_file.is_some() {