mirror of
https://github.com/danbulant/arcade-machine
synced 2026-07-07 20:10:36 +00:00
Added check for button combo (will exit app in future)
This commit is contained in:
parent
9412091524
commit
d6154ad3f5
1 changed files with 106 additions and 94 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
|
@ -7,6 +8,7 @@
|
||||||
<link rel="stylesheet" href="style.css">
|
<link rel="stylesheet" href="style.css">
|
||||||
<title>UI</title>
|
<title>UI</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<script src="Vars.js">
|
<script src="Vars.js">
|
||||||
</script> <!--Loadne Vars.js-->
|
</script> <!--Loadne Vars.js-->
|
||||||
|
|
@ -41,13 +43,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <audio id="Switchfocus">
|
|
||||||
<source src="Audio/switchfocus.mp3" type="audio/mpeg">
|
|
||||||
</audio>
|
|
||||||
<audio id="Audiostart">
|
|
||||||
<source src="Audio/audiostart.mp3" type="audio/mpeg">
|
|
||||||
</audio> -->
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
const prvnihra = [...document.querySelectorAll("button")]
|
const prvnihra = [...document.querySelectorAll("button")]
|
||||||
|
|
@ -102,7 +97,24 @@
|
||||||
//document.body.requestFullscreen();
|
//document.body.requestFullscreen();
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let keysPressed = {};
|
||||||
|
document.addEventListener('keydown', (event) => {
|
||||||
|
keysPressed[event.key] = true;
|
||||||
|
|
||||||
|
if (keysPressed[ExitKey1] && event.key == ExitKey2) {
|
||||||
|
alert(event.key);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
document.addEventListener('keyup', (event) => {
|
||||||
|
delete keysPressed[event.key];
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var vers = 0; /* Handles Running of apps */
|
var vers = 0; /* Handles Running of apps */
|
||||||
const { execFile, exec, spawn } = require('child_process');
|
const { execFile, exec, spawn } = require('child_process');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue