obsproject / obsproject/obs-studio

Prevent loading Mouse1/Mouse2 as hotkeys

Open
#13,403 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Good first issue
Dominant language
C
Stars
76.4k
Forks
10.2k
Avg merge
4d 23h
Merged PRs (30d)
12

Description

The UI currently prevents settings Mouse1 or Mouse2 or hotkeys, however if someone modifies their scene collection json to add these hotkeys, OBS will still load them and cause all sorts of weird behaviour.

The frontend prevents setting these as hotkeys, and libobs should similarly avoid loading them.

https://github.com/obsproject/obs-studio/blob/25fbaf7bb8d29cfd80d711e8f9f98c6638deab21/libobs/obs-hotkey.c#L469-L486

I think we would likely do so here, but it would good for someone to thoroughly investigate this and ensure it's the correct place to do so.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting libobs/obs-hotkey.c around lines 469-486 and compare its loading path with the frontend validation that rejects Mouse1 and Mouse2. Confirm where persisted hotkeys are loaded and ensure those keys are rejected there; done means modified scene collection JSON cannot load either hotkey without causing the reported behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.