Add HID/USB CLIENT library to Codecraft
It would be really cool to have the keyboard and mouse functionalities brought to Codecraft
https://wiki.seeedstudio.com/Wio-Terminal-USBCLIENT-Keyboard/
These three commands corresponds to the three different Mouse.click
Link to documentation
#include <Mouse.h>
void setup() {
Mouse.begin();
}
void loop() {
Mouse.click(MOUSE_LEFT);
Mouse.click(MOUSE_RIGHT);
Mouse.click(MOUSE_MIDDLE);
}
}
These three commands corresponds to the three different Mouse.press()
The latter acts as Mouse.release()
#include <Mouse.h>
void setup() {
Mouse.begin();
}
void loop() {
Mouse.press(MOUSE_LEFT);
Mouse.press(MOUSE_RIGHT);
Mouse.press(MOUSE_MIDDLE);
Mouse.release();
}
Mouse movement control link to documentation
Mouse.move(xVal, yVal, wheel)
Parameters
xVal: amount to move along the x-axis. Allowed data types: signed char.
yVal: amount to move along the y-axis. Allowed data types: signed char.
wheel: amount to move scroll wheel. Allowed data types: signed char.
Press a Specific Charaacter on the Keyboad, then release it as in [Keyboard.write()]
#include <Keyboard.h>
void setup() {
Keyboard.begin();
}
void loop() {
Keyboard.write(character);
}
}
More Keyboard functions:
Keyboard.press(key)
Keyboard.release(key)
Most important Keyboard.print() and Keyboard.println() the most useful one to write as in a keyboard.