This commit is contained in:
Jade (Rose) Rowland 2024-12-30 23:19:37 -05:00
parent 974376d404
commit 08f6c1ad5e
4 changed files with 29 additions and 2 deletions

View file

@ -438,6 +438,9 @@ let keyState;
export function getCurrentKeyboardState() {
if (keyState == null) {
if (typeof window === 'undefined') {
return;
}
keyState = {};
// Listen for the keydown event to mark the key as pressed
window.addEventListener('keydown', (event) => {