8 Commits

Author SHA1 Message Date
Carl Lange
da3ea61dab [web export] Fix Safari Arrow keys in HTML export/webapp (#2838)
* web: Fix Safari Arrow keys in HTML export and webapp\n\n- Remap Arrow key events with KeyboardEvent.location === 3 (numpad) to location: 0 on WebKit in capture phase\n- Prevent page scrolling on Arrow keys while canvas is focused\n- Ensure canvas is focusable (tabindex=0) and focused on start\n\nThis addresses Safari/WebKit misclassification of physical Arrow keys so games receive directional input correctly.

* Add missing semicolon

* Update index.html

* Update index.html
2025-09-20 10:10:42 +02:00
nesbox
59ff33bb14 #2313: fixed cart addition in wasm 2023-10-08 13:36:06 +02:00
nesbox
f63db38e92 fixed html tab outline 2023-08-14 12:45:24 +02:00
alectroemel
eadfb2239e focus the canvas on click 2023-05-26 11:10:49 -05:00
nesbox
859c71904b fixed html export #2061 2023-01-12 14:10:39 +01:00
tranxuanthang
f96ef1a6ca Refactor and improve HTML builds
This commit refactor & fix various problems in HTML builds:

- Build emscripten script as ES6 module, so that it doesn't pollute the
global namespace and can be easier to import to SPA projects
(vue, react,...).
- Change `SDL_EMSCRIPTEN_KEYBOARD_ELEMENT` to the canvas element so that
emscripten won't block all keyboard input to the rest of the
webpage (fixing the problem that make typing comment content on
tic80.com is not possible after starting the game)
- Add tabindex to canvas element so that canvas can be focused (and
unfocused) and capture the keyboard input properly.
- Refactor html template of html, html export stub and webapp
build to be more minimal, and add a simple "play" icon instead of
"click to play" text
- Small changes to html build directories in github action's script
2022-05-04 21:20:20 +07:00
Nesbox
1597f7b623 #1247: removed file dialogs, added ArgParse lib to parse app arguments, temporary removed code/sprites/map injection 2020-11-16 17:44:39 +03:00
Nesbox
f489d4302c pack wasm into .zip 2020-09-11 14:46:09 +03:00