mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-04-28 06:21:23 +00:00
feat(pwsp-gui): slash now toggles search focus
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user