C:\Users\Eddie\AppData\Local\Temp.arduinoIDE-unsaved2025422-12184-5ykbtt.yp4l3\sketch_may22d\sketch_may22d.ino: In function 'void loop()':
C:\Users\Eddie\AppData\Local\Temp.arduinoIDE-unsaved2025422-12184-5ykbtt.yp4l3\sketch_may22d\sketch_may22d.ino:10:3: error: 'DigiKeyboard' was not declared in this scope
DigiKeyboard.sendKeyStroke(KEY_T, MOD_CONTROL_LEFT);
^~~~~~~~~~~~
C:\Users\Eddie\AppData\Local\Temp.arduinoIDE-unsaved2025422-12184-5ykbtt.yp4l3\sketch_may22d\sketch_may22d.ino:10:30: error: 'KEY_T' was not declared in this scope
DigiKeyboard.sendKeyStroke(KEY_T, MOD_CONTROL_LEFT);
^~~~~
C:\Users\Eddie\AppData\Local\Temp.arduinoIDE-unsaved2025422-12184-5ykbtt.yp4l3\sketch_may22d\sketch_may22d.ino:10:30: note: suggested alternative: 'SREG_T'
DigiKeyboard.sendKeyStroke(KEY_T, MOD_CONTROL_LEFT);
^~~~~
SREG_T
C:\Users\Eddie\AppData\Local\Temp.arduinoIDE-unsaved2025422-12184-5ykbtt.yp4l3\sketch_may22d\sketch_may22d.ino:10:37: error: 'MOD_CONTROL_LEFT' was not declared in this scope
DigiKeyboard.sendKeyStroke(KEY_T, MOD_CONTROL_LEFT);
^~~~~~~~~~~~~~~~
C:\Users\Eddie\AppData\Local\Temp.arduinoIDE-unsaved2025422-12184-5ykbtt.yp4l3\sketch_may22d\sketch_may22d.ino:14:30: error: 'KEY_N' was not declared in this scope
DigiKeyboard.sendKeyStroke(KEY_N, MOD_CONTROL_LEFT);
^~~~~
C:\Users\Eddie\AppData\Local\Temp.arduinoIDE-unsaved2025422-12184-5ykbtt.yp4l3\sketch_may22d\sketch_may22d.ino:14:30: note: suggested alternative: 'SREG_N'
DigiKeyboard.sendKeyStroke(KEY_N, MOD_CONTROL_LEFT);
^~~~~
SREG_N
C:\Users\Eddie\AppData\Local\Temp.arduinoIDE-unsaved2025422-12184-5ykbtt.yp4l3\sketch_may22d\sketch_may22d.ino:18:3: error: 'Digikeyboard' was not declared in this scope
Digikeyboard.sendKeyStrokes(KEY_F4);
^~~~~~~~~~~~
C:\Users\Eddie\AppData\Local\Temp.arduinoIDE-unsaved2025422-12184-5ykbtt.yp4l3\sketch_may22d\sketch_may22d.ino:18:31: error: 'KEY_F4' was not declared in this scope
Digikeyboard.sendKeyStrokes(KEY_F4);
^~~~~~
C:\Users\Eddie\AppData\Local\Temp.arduinoIDE-unsaved2025422-12184-5ykbtt.yp4l3\sketch_may22d\sketch_may22d.ino:18:38: error: expected '}' at end of input
Digikeyboard.sendKeyStrokes(KEY_F4);
^
exit status 1
Compilation error: 'DigiKeyboard' was not declared in this scope
Here is the code
void setup() {
}
void loop() {
// New tab
DigiKeyboard.sendKeyStroke(KEY_T, MOD_CONTROL_LEFT);
// New window
DigiKeyboard.sendKeyStroke(KEY_N, MOD_CONTROL_LEFT);
Please correct your posts and add code tags around your code.
There is a small pencil below your existing posts.
click on this pencil ā that will let you edit your post.
Select the part of the text that corresponds to the code
Click on the <code/> icon in the toolbar to indicate that it is code
click Save Edit
(Also make sure to properly indent the code in the IDE before copying and pasting it here. This can be done by pressing ctrlT on a PC or cmdT on a Mac)
so i changed the #include to the board in my library but now im getting this error code
In file included from C:\Users\Eddie\AppData\Local\Temp\.arduinoIDE-unsaved2025423-2980-4z2y5r.x2p8h\sketch_may23a\sketch_may23a.ino:1:0:
c:\Users\Eddie\Documents\Arduino\libraries\DigiKeyboardBe\src/DigiKeyboardBe.h:1:10: fatal error: DigiKeyboard.h: No such file or directory
#include "DigiKeyboard.h"
^~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
Compilation error: exit status 1