Repository navigation
Add configurable global hotkeys - #298
Draft
mardausdennis wants to merge 2 commits into
Draft
mardausdennis wants to merge 2 commits into
mardausdennis wants to merge 2 commits into
Conversation
Adds an opt-in Fixed position mode. The overlay is placed by monitor, one of nine anchors and a margin, sizes itself to the user list and stays click-through. Starting Overlayed again while it runs opens the settings. Refs overlayeddev#293, overlayeddev#291
Adds global hotkeys for pin, show/hide, next monitor and open settings, with a Hotkeys tab to record them. Bindings live in config.json in the shape suggested in overlayeddev#201 and are registered from Rust through tauri-plugin-global-shortcut. Replaces the unused use-keybinds hook. Refs overlayeddev#201
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #201. Builds on #297, so the first commit here is that PR. I'll rebase once it's in.
This adds global hotkeys that work while a game has focus. There are four commands: lock/unlock the overlay (pin), show/hide it, move a fixed overlay to the next monitor, and open settings. Defaults are Ctrl+Shift+H for pin and Ctrl+Shift+G for show/hide, the same letters as the unused
use-keybinds.ts, which this replaces. The other two start unbound. A new Hotkeys tab lets you record a combination, clear it, and shows an error inline when another app or another command already uses it.Bindings are stored in
config.jsonin the shape you suggested in #201 ({ "key": ..., "command": "pin" }). Since the config still only lives in the frontend, the main window sends the bindings to a Rust command, and Rust registers them throughtauri-plugin-global-shortcut. Pin and open settings run in Rust, show/hide and next monitor go back to the frontend as events.A few choices you may want to weigh in on:
tauri-plugin-global-shortcut2.2.0 as a Rust dependency, matching the JS package that was already inpackage.jsonhide(), becauseshow()activates the window on Windows and would pull focus out of a fullscreen gametoggle_pinandset_pinare wrapped inhotkeys.rsunder the same IPC names, so a hidden overlay stays click-through when it gets unpinned, and the tray uses the same pathTested on Windows 11 by pressing the default hotkeys against the installed build with another window in the foreground. Pin and show/hide toggled, the anchored corner stayed put, and the foreground window never changed. macOS and Linux are only built by CI. The key conversion and the register/unregister logic have unit tests in
hotkeys.rs.