Listen for keydown event on document
This commit is contained in:
parent
ad3847f5aa
commit
56cff8deb2
1 changed files with 1 additions and 1 deletions
|
|
@ -498,7 +498,7 @@ window.addEventListener("load", function() {
|
||||||
document.addEventListener("touchend", handleEnd);
|
document.addEventListener("touchend", handleEnd);
|
||||||
document.addEventListener("touchcancel", handleEnd);
|
document.addEventListener("touchcancel", handleEnd);
|
||||||
document.addEventListener("touchmove", handleMove);
|
document.addEventListener("touchmove", handleMove);
|
||||||
window.addEventListener("keydown", function(evt) {
|
document.addEventListener("keydown", function(evt) {
|
||||||
if (activeScene && activeScene.classList.contains("key")) {
|
if (activeScene && activeScene.classList.contains("key")) {
|
||||||
handleKeydown(evt);
|
handleKeydown(evt);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue