obsproject / obs-browser

CEF-based OBS Studio browser plugin
GNU General Public License v2.0
788 stars 227 forks source link

Arrow keys register twice in browser source interact window #361

Open UmpquaRiver opened 2 years ago

UmpquaRiver commented 2 years ago

Operating System Info

macOS 12.0

Other OS

No response

OBS Studio Version

27.2.4

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/N-lR1rzq9O25veQ9

OBS Studio Crash Log URL

No response

Expected Behavior

The arrow keys in a browser interact window should only register once when pressed, unless held.

Current Behavior

The arrow keys register twice when pressed once. For instance, when the left arrow key is pressed once in a text field, the insertion point moves two spaces to the left.

Steps to Reproduce

  1. Add Browser Source
  2. Link source to any site with a text field (Google, DuckDuckGo, etc)
  3. "Interact" with source
  4. Type in text field
  5. Move insertion point with arrow keys to demonstrate problem ...

Anything else we should know?

I've noticed that OBS only behaves this way on MacOS (both x86 and Apple Silicon through Rosetta). Linux Mint did not have the same issue and testing over the phone with a Windows user did not produce the same problem.

For me, this causes problems for HTML slideshow presentations. The slide moves two forward or back instead of one!

WizardCM commented 2 years ago

Hmm, my first guess is that it's treating both press and release as press+release, resulting in the event firing twice.

UmpquaRiver commented 2 years ago

I've opened up OBS and that seems to be correct. The second registered "press" appears to correlate with how long I hold the key before releasing.

gxalpha commented 2 years ago

Can confirm with this tester. Seems to be specific to the arrow keys. Though for me it's keydown twice, while other event's (like press and up) aren't sent at all.

erijohnt commented 11 months ago

Bug is still present in OBS version 30.0.2 with macOS 13.5.2. If this seems like a "good first issue"-level bug, I could take a stab at it if someone has any hypotheses or ideas about where to look.