Skip to content

Added KEY_SPACE definition to USBHIDKeyboard.h #8921

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

HSBL-ko-gyo
Copy link

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 as 0x20, 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 use Keyboard.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

  1. Please provide specific title of the PR describing the change, including the component name (eg. „Update of Documentation link on Readme.md“)
  2. Please provide related links (eg. Issue which will be closed by this Pull Request)
  3. Please update relevant Documentation if applicable
  4. Please check Contributing guide

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)

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` as `0x20`, 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 use `Keyboard.press(KEY_SPACE);` in a manner consistent with other keys.
@CLAassistant
Copy link

CLAassistant commented Nov 25, 2023

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants