obsproject / obsproject/obs-browser
KeyboardEvent properties don't match real browsers
Nobody has claimed this yet.
- 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
- Create a browser source with the URL set to
https://domeventviewer.com/key-event-viewer.html. Leave the other settings unchanged. - Interact with the source and press a key.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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