obs-browser icon indicating copy to clipboard operation
obs-browser copied to clipboard

KeyboardEvent properties don't match real browsers

Open Amphitryon0 opened this issue 3 years ago • 6 comments

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.

Amphitryon0 avatar Oct 06 '21 08:10 Amphitryon0