Open ImLunaHey opened 2 weeks ago
maybe something like this?
KeyboardEvent.prototype.getModifierState = function (key: string) {
const modifierKeys = {
Alt: this.altKey,
Control: this.ctrlKey,
Meta: this.metaKey,
Shift: this.shiftKey,
};
return !!modifierKeys[key];
};
Describe the bug
getModifierState
isundefined
onKeyboardEvent
.To Reproduce
this should return
true
instead i getTypeError: event.getModifierState is not a function
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState