Allow both cases in shift+hotkeys #67
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: profectus/Profectus#67
Loading…
Reference in a new issue
No description provided.
Delete branch "escapee/profectus-template:main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The inclusion of
shift+
in the hotkey key makes it feel like keys such asshift+t
should work, but as it stands such a hotkey would only function asshift+T
. I believe this is undesirable, asT
already inherently includes ashift
, such a hotkey would feel like sayingshift+shift+t
.This is largely fixed with a simple
.toLowerCase()
on the key, except for the fact that there are special keys that may be used alongside the shift key where there's noshift+
variant (e.g.shift+ArrowLeft
). As such, I have gone for a backup hotkey check rather than simply lowercasing the key in thee.shiftKey
case, which ideally should allow all possibleshift+key
combinations.b204e3cc42
tob40d4bef32
Good change. I was going to note that it doesn't handle numbers turning into symbols, but I don't think those are consistent across keyboard layouts anyways. LGTM!
Those should also be handled already by the "uppercase numbers" code that you have, although it might be good to make sure we support direct symbol use in hotkey keys too (in another PR, if those aren't already working)