diff options
Diffstat (limited to 'src/index.html.in')
-rw-r--r-- | src/index.html.in | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/index.html.in b/src/index.html.in index 0b76295..8d0ccea 100644 --- a/src/index.html.in +++ b/src/index.html.in @@ -90,9 +90,16 @@ async function main() { const mousey = e.clientY; if (e.button == 0) { exports.game_update(INPUT_CLICK, mousex, mousey, now()); + } else if (e.button == 2) { + e.preventDefault(); + exports.game_update(INPUT_RCLICK, mousex, mousey, now()); } }); + canvas.addEventListener("contextmenu", function (e) { + e.preventDefault(); + }); + document.addEventListener("keydown", function (e) { if (e.key === " ") { exports.game_update(INPUT_PAUSE_PLAY, 0, 0, now()); |