obsproject / obsproject/obs-browser

KeyboardEvent properties don't match real browsers

Open
#319 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Confirmed
Dominant language
C++
Stars
904
Forks
267
Avg merge
1d 23h
Merged PRs (30d)
2

Description

Operating System Info

Windows 10

Other OS

No response

OBS Studio Version

27.2.4

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/1RjIPQfX0BqFKJ98

OBS Studio Crash Log URL

No response

Expected Behavior

The KeyboardEvent generated should be similar to that originating in a regular browser. For example, using a standard US layout, typing a colon with the right shift key should generate two events with (among others) the following properties:

.code .key .location
"ShiftRight" "Shift" 2
"Semicolon" ":" 0
Current Behavior

Using the same example of typing a colon, I see the following properties:

.code .key .location
"" "Shift" 0
"" ":" 0

From this and other tests, it seems that code is always blank, and location is always 0.

Steps to Reproduce
  1. Create a browser source with the URL set to https://domeventviewer.com/key-event-viewer.html. Leave the other settings unchanged.
  2. Interact with the source and press a key.
  3. Observe incorrect properties.
Anything else we should know?

I saw that there have been similar issues closed, but I'm not sure if they were considered fixed or just as close as we could get. If it's the latter case, I'm sorry for being yet another person to bring this up. The webpage I'm actually using can be modified to use OBS's key values when it detects that it's running in OBS, but then it's still locked to one keyboard layout.

Contributor guide

No contributing guide indexed for this repository

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

Reproduce the issue with a browser source using https://domeventviewer.com/key-event-viewer.html and the standard US-layout colon example. Read the CEF keyboard-event handling in the OBS browser plugin and compare emitted code, key, and location values with the expected table. Done means the generated events expose browser-compatible properties where the platform provides them, with tests or reproduction results covering the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.