v1 #4
共有 1 個檔案被更改,包括 1 行新增 和 1 行删除
|
@ -52,7 +52,7 @@ class Input {
|
||||||
|
|
||||||
window.addEventListener("keydown", (e)=>{
|
window.addEventListener("keydown", (e)=>{
|
||||||
//blocks the action of the key (cf. Killian)
|
//blocks the action of the key (cf. Killian)
|
||||||
if(["Space","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(e.code)) {
|
if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(e.code)) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
this.keysDown.add(e.key.toLowerCase())
|
this.keysDown.add(e.key.toLowerCase())
|
||||||
|
|
載入中…
新增問題並參考