-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
24 lines (24 loc) · 722 Bytes
/
Copy pathindex.html
File metadata and controls
24 lines (24 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<html>
<head>
<script>
/*
* The emulator doesn't use the keyboard at all at this point so no need
* to capture those events and break keyboard shortcuts. I don't know much
* about javascript so gratitude to samuelnj from Stack Overflow for this
* solution:
*
* https://stackoverflow.com/a/47231903
*/
window.addEventListener('keydown', function(event){
event.stopImmediatePropagation();
}, true);
window.addEventListener('keyup', function(event){
event.stopImmediatePropagation();
}, true);
</script>
</head>
<body>
<canvas id="canvas"></canvas>
<script async src="index.js"></script>
</body>
</html>