feat(Shortcuts): add quick tab switching and activate search box shortcuts. - #639
AdityasahuX07 wants to merge 16 commits into
Conversation
2e4a0fb to
68134d4
Compare
Add back navigation handling for NativeTabBridge.
|
Two things before merge: please disable the global shortcuts while any text input is focused, not just the main Search box, and make them plain-key shortcuts so modifier combinations aren’t intercepted. Also please restore trackMaximizedBoundsForCurrentScreen() removing it is unrelated to this PR and regresses the Windows multi-monitor maximize workaround. |
Refactor back navigation logic to handle Settings tab correctly.
Added support for handling key events in the application and implemented a workaround for multi-monitor maximization on Windows.
Renamed isSearchBoxFocused to isTextInputFocused for clarity and updated comments.
check now |
|
The modifier fix is good, but the text-input fix still only tracks the main Search box renaming the flag to isTextInputFocused doesn’t make it global. Other text fields can still trigger the shortcuts, and now Backspace can navigate away while editing them. Also please restore and use the existing DesktopMaximizedBounds.kt helper instead of duplicating it in Main.kt; the new copy rewrites maximized bounds on every move/resize, which the existing implementation intentionally avoids. I’d also remove the new global Backspace binding since #625 only requires the mouse back fix and already says Esc works. |
The backspace is intentionally add it was my original idea of shortcut feature because the backspace is easily accessible specially for the right handed users. |
|
Yeah no app using that. We dont need Backspace |
in future when the arrow keys will implemented the Backspace is essential |
Stremio, all web app and browser uses the Backspace to go back universally |
|
Arrow-key navigation doesn’t make Backspace essential. Esc already covers keyboard back navigation without conflicting with text editing, so I’d prefer to keep Backspace unbound globally. Also no, there is no "backspace" shortcut universally. |
|
When we add bindable shortcuts, Users can do whatever they want with shortcuts. Currently we only set universal shortcuts. Which backspace is used for deleting text. Esc is global and universal for going back. |
backspace just add extra option if u dont want to use then just dont use this nothing changes for you but adds extra option for the user who used to with backspace as go back is this is the option for that, so in conclusion nothing removes just add extra option that not affect other user they can chose their own comfort. personally, I am always hit to backspace every time then press the esc because backspace is not working yet. since majority people come from stremio or use side by side with nuvio in this case backspace is very important feature. |
|
I get the preference argument, but a global Backspace binding is not just an extra option unless it’s configurable. Backspace already has an editing function, so I don’t want it bound globally by default. If we add configurable shortcuts later, users can opt into Backspace then. |
one more things to add that I personally in my workflow to use like this - esc is used to close video player and backspace is used to go back. This is let me help to not close the video player accidently esc for me works as kill switch of video player. this is reason I added 2 go back keys as already said it does not disable esc when backspace is added both work same to go back |
|
I understand your workflow, but I don’t want Backspace as a default global binding. Let’s keep Esc for now and revisit Backspace when shortcuts become configurable. |
please I insist keep this since this not affect anyone who use esc but who migrated or use stermio side by side this is life saver |
|
I understand, but I’m not accepting Backspace as a default global binding. Please remove it from this PR. We can revisit it later as a configurable shortcut. |
Ok we will do this in configurable shortcut |
Clarified focus handling for the Search tab's input box in comments.
Done, check this now |
|
Thanks for the updates. The modifier handling and maximized-bounds helper look fixed, and Backspace has been removed. |
Added functionality to track focus state of text inputs for global keyboard shortcuts.
Done.
See the test build screen rec. - everything working as expected. Recording.2026-09-10.133843.mp4 |
|
The Backspace, modifier and maximized-bounds issues are fixed. The remaining text-input issue still isn’t fixed globally, though. trackTextInputFocusForShortcutGuard() currently only gets attached to the main Search field. Library search, Settings search, API/secret fields, addon/server URL fields and other text inputs still never register focus, so 1–4, /, 0 and Esc can still be intercepted while typing in them. Please apply the guard to all text-input paths (preferably through shared text-field components where possible), then rebase onto current Dev. Also clean up the stale Backspace comment in MainAppContent. |
- Add guard to shared NuvioInputField (Components.kt) so all usages (Search, Addons URL, CollectionEditor, ProfileEdit) are covered globally - Add guard to SettingsSecretTextField (API/secret key fields) - Add guard to SettingsSearchField (Settings search bar) - Remove now-redundant explicit guard call in SearchScreen (NuvioInputField handles it) - Rebase Main.kt onto current Dev: add configureLinuxSwingGlobalsBeforeAwt() for HiDPI Linux fix and consolidate trackMaximizedBoundsForCurrentScreen into the single fullscreen DisposableEffect - Clean up stale Backspace mention in MainAppContent backRequests comment
Done. |
Summary
Added global keyboard shortcuts to quickly navigate between root tabs and improved search accessibility on Desktop.
Focus safety: All of the above global shortcuts are explicitly disabled while the search text box is actively focused, allowing users to type "1", "0", or "/" normally without triggering accidental tab switches.
Escape focus: Pressing the Escape key while the search box is focused will now seamlessly drop focus and re-enable the global navigation shortcuts.
PR type
Why
To improve keyboard-first navigation on Desktop platforms. Users expect standard global hotkeys to switch between primary interface tabs without reaching for the mouse, and need a frictionless way to instantly jump into the search bar from anywhere in the app.
Desktop scope
This change spans across Compose Desktop shared commonMain logic and desktopMain window event dispatching. It affects all desktop platforms (Windows, macOS, Linux). Shared native tab bridge logic was slightly extended to support explicit focus requests purely for desktop consumption.
Issue or approval
Fixes #625, Fixes #635
UI / behavior impact
Policy check
CONTRIBUTING.md.Scope boundaries
This is strictly limited to adding the keyboard listener for the four primary root tabs and the search focus logic. Intentionally avoided adding shortcuts for deeper nested navigation, internal settings pages, or playback shortcuts to keep the PR focused and minimal. Did not apply any UI polishing or cosmetic changes.
Testing
Screenshots / Video
Not a UI change.
Breaking changes
None.
Linked issues
Fixes #625, Fixes #635