Skip to content

fix: only hold shortcut keys while FourFold is in front - #48

Merged
CodySimonds65 merged 1 commit into
mainfrom
fix/hotkeys-only-when-focused
Nov 20, 2026
Merged

CodySimonds65 merged 1 commit into
mainfrom
fix/hotkeys-only-when-focused

Conversation

@CodySimonds65

Copy link
Copy Markdown
Owner

A user reported that FourFold grabbed their Shift+Space shortcut, so they couldn't run and jump in other games.

Shortcut chords with Ctrl, Alt or Shift go through Windows' RegisterHotKey, which takes the keys from every app for as long as FourFold is running.

  • WindowsGlobalHotkeyRegistrar remembers its chords. When FourFold loses focus it releases them, and when FourFold comes back to the front it registers them again (Application.Activated / Deactivated). While FourFold is in the background a new chord is still checked against Windows (registered, then released right away), so a refused chord still shows as unavailable.
  • Plain-key shortcuts (raw input, never taken from other apps) now only act while FourFold is in front too, like mouse shortcuts already did. Before this, pressing a bound plain key in another game ran the FourFold action.

The game panels live inside FourFold's window, so in-game shortcuts work the same as before.

Tested

  • dotnet test Desktop.Tests: 34 passed.
  • Live: launched the Release build and tried to register its bound Shift+O from a separate process. With FourFold in front: refused (FourFold holds it). With Notepad in front: free.

RegisterHotKey took a bound chord such as Shift+Space from every other app
for as long as FourFold ran. The chords are now released when FourFold loses
focus and registered again when it comes back, and plain-key shortcuts no
longer fire on keys pressed in another app.
@CodySimonds65
CodySimonds65 merged commit ffa9d67 into main Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant