diff --git a/README.md b/README.md index 78cf448..fd094e2 100644 --- a/README.md +++ b/README.md @@ -173,8 +173,10 @@ cargo tauri build | `L` | Lyrics | | `Q` | Queue | | `F` | TV mode | +| `Ctrl K` | Search your library, or paste a link | +| `Ctrl L` | Get: the link and online search bar | +| `Ctrl B` | Collapse or expand the sidebar | | `P` | Mini player | -| `Ctrl K` | Link or search bar | | `Ctrl F` | Search the current view | | `Delete` | Delete the selected songs (with confirmation) | | `Ctrl A` | Select all in the current list | diff --git a/ui/app.js b/ui/app.js index 33dbda2..687d28c 100644 --- a/ui/app.js +++ b/ui/app.js @@ -239,6 +239,7 @@ async function init() { bindConnect(); bindUpdates(); bindPlaybackSettings(); + bindSearch(); bindStats(); await listen("atmosphere://job", (e) => onJob(e.payload)); await listen("atmosphere://probe", (e) => onProbe(e.payload)); @@ -435,7 +436,10 @@ function go(view) { function onKey(e) { const mod = e.ctrlKey || e.metaKey; - if (mod && (e.key === "k" || e.key === "l")) { + if (mod && e.key.toLowerCase() === "k") { + e.preventDefault(); + openSearch(); + } else if (mod && e.key.toLowerCase() === "l") { e.preventDefault(); go("get"); $("#commandInput").focus(); diff --git a/ui/index.html b/ui/index.html index cb8f230..f9be39d 100644 --- a/ui/index.html +++ b/ui/index.html @@ -28,7 +28,8 @@