Skip to content

Commit 7cc7a3b

Browse files
committed
fix: ignore repeated keys to prevent client fps drop
1 parent 2146686 commit 7cc7a3b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

client/input.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ window.setupInput = () => {
7171
}
7272

7373
window.onkeydown = e => {
74+
if (e.repeat) return;
7475
window.input.flushInputHooks();
7576
if(e.keyCode >= 112 && e.keyCode <= 130 && e.keyCode !== 113) return;
7677
window.input.keyDown(e.keyCode);

0 commit comments

Comments
 (0)