Added KEY_SPACE definition to USBHIDKeyboard.h #8921
Closed
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.
This commit introduces a new key definition for the space key in the USBHIDKeyboard.h file. Previously, there was no direct way to refer to the space key in the HID keyboard interface. Users had to use the ASCII value '0x20', which was not intuitive and inconsistent with how other keys are handled.
By defining
KEY_SPACE
as0x20
, this commit aligns the handling of the space key with other special keys in the library, making the code more readable and user-friendly. This change simplifies the process of programming keyboard interactions, especially for beginners, by allowing them to useKeyboard.press(KEY_SPACE);
in a manner consistent with other keys.By completing this PR sufficiently, you help us to review this Pull Request quicker and also help improve the quality of Release Notes
Checklist
This entire section above can be deleted if all items are checked.
Description of Change
Please describe your proposed Pull Request and it's impact.
Tests scenarios
Please describe on what Hardware and Software combinations you have tested this Pull Request and how.
(eg. I have tested my Pull Request on Arduino-esp32 core v2.0.2 with ESP32 and ESP32-S2 Board with this scenario)
Related links
Please provide links to related issue, PRs etc.
(eg. Closes #number of issue)