From c3268bc66c141dcaa647c674bad288586893e851 Mon Sep 17 00:00:00 2001 From: Tyler Date: Sun, 17 May 2026 01:03:55 -0700 Subject: Add ⌘K / Ctrl+K shortcut to focus sidebar ticker search MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injects a zero-height components.html block after the market bar that listens for Cmd/Ctrl+K and focuses the sidebar search input by matching its placeholder text. Co-Authored-By: Claude Sonnet 4.6 --- app.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/app.py b/app.py index 5e45618..282b4e4 100644 --- a/app.py +++ b/app.py @@ -771,6 +771,25 @@ with st.container(): st.divider() +# ── ⌘K / Ctrl+K shortcut — focuses sidebar ticker search ───────────────────── +components.html( + "", + height=0, + scrolling=False, +) + # ── Main Content ────────────────────────────────────────────────────────────── if st.session_state["active_tab"] == "macro": -- cgit v1.3-2-g0d8e From f013bf1243c191b8d6d23db1f144cb2f7270d063 Mon Sep 17 00:00:00 2001 From: Tyler Date: Sun, 17 May 2026 01:15:46 -0700 Subject: Switch keyboard shortcut from Ctrl+K to / for ticker search focus Ctrl+K conflicts with the browser address bar on Linux. / is the conventional global search shortcut (GitHub, Linear) and is not intercepted by browsers. Guard prevents firing while an input is focused. Co-Authored-By: Claude Sonnet 4.6 --- app.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 282b4e4..d22635b 100644 --- a/app.py +++ b/app.py @@ -775,11 +775,13 @@ st.divider() components.html( "