Skip to content

feat(mkb): Add option to disable Ctrl+Scroll zoom in fullscreen#908

Open
huneyoliv wants to merge 2 commits into
redphx:typescriptfrom
huneyoliv:feat/zoom-block
Open

feat(mkb): Add option to disable Ctrl+Scroll zoom in fullscreen#908
huneyoliv wants to merge 2 commits into
redphx:typescriptfrom
huneyoliv:feat/zoom-block

Conversation

@huneyoliv
Copy link
Copy Markdown

Description

Added a new Mouse & Keyboard preference (StreamPref.MKB_DISABLE_ZOOM) to optionally block the Ctrl+Scroll browser zoom behavior when playing in fullscreen, preventing accidental browser scaling during intense gameplay.

Since it's implemented as a StreamPref, it natively supports being toggled globally or per-game in the Stream Settings overlay.

Changes made

  • Added MKB_DISABLE_ZOOM to pref-keys.ts and stream-settings-storage.ts
  • Exposed the setting toggle as the first option in the MKB settings tab in settings-dialog.ts
  • Injected wheel event listeners that passively capture e.ctrlKey inside index.ts only when fullscreen is active.
  • Added a translation array for the new "disable-zoom" string across all supported languages in translation.ts.

Testing

  • Tested locally by compiling with Bun and validating the settings toggle in both Global and Stream overlays.
  • Verified that Ctrl+Scroll zoom is successfully blocked in fullscreen and allowed normally when windowed or when the option is disabled.

(Note: I've read the README about PR rules, but this is a very helpful QoL/Accessibility feature to prevent zooming issues for Mouse/Keyboard players on PC browsers without needing external extensions. Please consider it!)

@redphx
Copy link
Copy Markdown
Owner

redphx commented Mar 24, 2026

thank you. I'll take a look later.

@huneyoliv
Copy link
Copy Markdown
Author

Don't add my PR now. I found a bug in specifics situations I will fix that.
When I have fixed, I return to warn you.

@Milborne
Copy link
Copy Markdown

hi

@huneyoliv
Copy link
Copy Markdown
Author

Hi bro

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.

3 participants