Currently we only include the Shift key in the hotkey string if the user is not typing a letter. This is inconsistent: for any other modifier, we always include it in the string if held. But for Shift, we only sometimes include it in the string if held.
To make hotkey strings easier to reason with, this PR changes the logic to always include Shift if held.
[!IMPORTANT]
This is a breaking change we should release with a major version bump (3.0.0). Any existing hotkeys that use uppercase letters without Shift will need to be updated to add Shift. So A would become Shift+A, B would become Shift+B, etc. This does mean that these hotkeys will no longer fire if the letter is pressed alone when CapsLock is on. I think this is acceptable because this behavior was never clearly defined in the docs and it is unintuitive that different effects might occur depending on whether caps lock is on or not.
Currently we only include the
Shift
key in the hotkey string if the user is not typing a letter. This is inconsistent: for any other modifier, we always include it in the string if held. But forShift
, we only sometimes include it in the string if held.To make hotkey strings easier to reason with, this PR changes the logic to always include
Shift
if held.This closes https://github.com/github/hotkey/issues/54 by making
Shift
handling consistent across all keys and platforms.