Closed
Description
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
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.