BadUSB: Fix key combos main keys being case sensitive #4216
+1
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's new
ducky_get_keycode()
toducky_get_keycode_by_name()
+BADUSB_ASCII_TO_KEY()
BADUSB_ASCII_TO_KEY()
will return a keycode with modifier included, such asBADUSB_ASCII_TO_KEY(bad_usb, 'Z')
will return the equivalent ofSHIFT z
not justz
CTRL-ALT Z
was no longer pressingctrl+alt+z
, but insteadctrl+shift+alt+z
CTRL-ALT z
, but on the other it seems more appropriate to consider keycodes without modifiers while processing a key combination, as the user is expected to specify it withCTRL-SHIFT-ALT Z
for example, so this PR changes to the latter behavior, as it is also how key combinations worked previously; automatically adding modifiers such asSHIFT z
withBADUSB_ASCII_TO_KEY()
is used in theSTRING
and related commands, where it is more appropriateVerification
CTRL-ALT Z
or any other key combo including a capital main letterctrl+alt+z
instead ofctrl+shift+alt+z
Checklist (For Reviewer)