Fixed invalid key event

This commit is contained in:
FlamedDogo99 2024-06-06 21:33:25 -06:00
parent e382e2c00c
commit 4846e06d0f

View File

@ -355,7 +355,7 @@ function insertCanvasElements() {
document.body.appendChild(inventoryButton);
let exitButton = createTouchButton("exitButton", "inMenu");
exitButton.style.cssText = "top: 0vh; margin: auto; left: 0vh; right:8vh; width: 8vh; height: 8vh;"
exitButton.addEventListener("touchstart", function(e){keyEvent("`", "keyup")}, false);
exitButton.addEventListener("touchstart", function(e){keyEvent("`", "keydown")}, false);
exitButton.addEventListener("touchend", function(e){keyEvent("`", "keyup")}, false);
document.body.appendChild(exitButton);
// input for keyboard button