Closed colinsullivan closed 1 year ago
Got a test , not sure how to fix it though...
The _tryReleaseSelfReleasingKeys
method seems like it has additional problems, maybe the feature hasn't been worked through fully yet?
Thanks for reporting this issue. Let me take a look at your PRs. 🍻
Closing as I've merged #10 but we can continue the conversation if you have feedback.
Describe the bug Crash when using self-releasing keys feature
To Reproduce Steps to reproduce the behavior: Use self-releasing keys with a key combo Note error in console
Expected behavior Feature works
Additional context
The issue is here:
https://github.com/RobertWHurst/Keystrokes/blob/master/packages/keystrokes/src/keystrokes.ts#L435
Note the objects in
_activeKeyPresses
are already in the form of{ key: "z", event: { ... } }
. Then the crash occurs here:https://github.com/RobertWHurst/Keystrokes/blob/master/packages/keystrokes/src/keystrokes.ts#L340
Because
event.key.toLowerCase
is undefined