epixthunder
Posts: 1
Joined: Mon Sep 18, 2023 3:11 pm

Emscripten Javascript Keyboard input

I'm trying to interate with the web mame through the browser dev console with keyboard event sending commands to the mame window/canvas, but with the "new" isTrusted security feature in the dispatchEvent ,it cant't be done. The event is trigged, but the real behaviour don't.

As an alternative, i'm aware of the exported SDL_SendKeyboardKey function to allow scancode injection in Emscripten build since mame 0.174.
With this, i can proxy when key is trigged, but when i try to use, it don't responds very well. After a console command, it only activates with a manual focus. And when i send a sequence of commands (pressed, released...), it only react to the last one at the moment i click the canvas.

Any ideas to help me with that?

Thanks in advance!

Return to “MAME Discussion”