You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is no key code corresponding to the space key in USBHIDKeyboard.h. To use the space key, you need to use the ASCII value 32, which is not intuitive. I suggest adding a key code that corresponds to the space key.
For example, you can define:
#define KEY_SPACE 0x20
This change allows you to write code for pressing the space bar just like any other special key:
Keyboard.press(KEY_SPACE);
We would appreciate it if you would consider fixing this issue. Thank you.
Sketch
Keyboard.press(KEY_SPACE);
Debug Message
note: suggested alternative: 'KEY_HOME'
exit status 1
Compilation error: 'KEY_SPACE' was not declared in this scope
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
I confirm I have checked existing issues, online documentation and Troubleshooting guide.
The text was updated successfully, but these errors were encountered:
Thank you for your response. Although I am still a beginner who is not familiar with using GitHub, I created a pull request regarding the addition of KEY_SPACE. Here is my suggestion: #8921
If there are any mistakes, I would appreciate it if you could point them out. I would like to continue learning and moving forward so that I can contribute to this project.
Thank you for your prompt response. I didn't realize that you were already working on the improvements I was about to suggest. Thank you very much for this wonderful contribution.
We look forward to your continued cooperation in the development of this project. I'm really thankful to you.
Board
all
Device Description
Hardware Configuration
Version
v2.0.14
IDE Name
arduinoIDE
Operating System
all
Flash frequency
all
PSRAM enabled
no
Upload speed
11520
Description
There is no key code corresponding to the space key in USBHIDKeyboard.h. To use the space key, you need to use the ASCII value 32, which is not intuitive. I suggest adding a key code that corresponds to the space key.
For example, you can define:
#define KEY_SPACE 0x20
This change allows you to write code for pressing the space bar just like any other special key:
Keyboard.press(KEY_SPACE);
We would appreciate it if you would consider fixing this issue. Thank you.
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: