Skip to content

libobs: Prevent loading Mouse1/Mouse2 as hotkeys#13520

Open
KEY-13 wants to merge 1 commit into
obsproject:masterfrom
KEY-13:fix-prevent-mouse-hotkey-loading
Open

libobs: Prevent loading Mouse1/Mouse2 as hotkeys#13520
KEY-13 wants to merge 1 commit into
obsproject:masterfrom
KEY-13:fix-prevent-mouse-hotkey-loading

Conversation

@KEY-13

@KEY-13 KEY-13 commented Jun 5, 2026

Copy link
Copy Markdown

The frontend already prevents users from setting Mouse1 or Mouse2 as hotkeys via the UI, but if someone manually edits their scene collection JSON file to add these keys, OBS would still load them, causing unexpected behavior.

Add a guard in create_binding() to filter out OBS_KEY_MOUSE1 and OBS_KEY_MOUSE2. This placement ensures the protection also covers third-party plugins that call the public API function obs_hotkey_load_bindings().

Closes #13403

Description

Motivation and Context

How Has This Been Tested?

Types of changes

Checklist:

  • I have read the contributing document.
  • My code has been run through clang-format.
  • My code follows the project's style guidelines
  • My code is not on the master branch.
  • My code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

The frontend already prevents users from setting Mouse1 or Mouse2 as
hotkeys via the UI, but if someone manually edits their scene collection
JSON file to add these keys, OBS would still load them, causing
unexpected behavior.

Add a guard in create_binding() to filter out OBS_KEY_MOUSE1 and
OBS_KEY_MOUSE2. This placement ensures the protection also covers
third-party plugins that call the public API function
obs_hotkey_load_bindings().

Closes obsproject#13403
@Fenrirthviti

Copy link
Copy Markdown
Member

Please properly fill out the PR template, ensuring each item is correctly followed.

@WizardCM WizardCM added the kind/bug Categorizes issue or PR as related to a bug. label Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Categorizes issue or PR as related to a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent loading Mouse1/Mouse2 as hotkeys

3 participants