RobertWHurst / Keystrokes

Keystrokes as an easy to use library for binding functions to keys and key combos. It can be used with any TypeScript or JavaScript project, even in non-browser environments.
MIT License
153 stars 6 forks source link

Ensure event keys are properly lowercased #14

Closed RobertWHurst closed 1 year ago

RobertWHurst commented 1 year ago

When I introduced custom event objects I accidentally broke key comparison when activating a key combos handler when the key value was capitalized. This broke combos that contained shift. This PR fixes that issue by copying the event object and lowercasing the key value then using the event throughout the _handleKeyPress. Resolves another issue found by @NinjaNas in #6