Skip to content
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

Add HID/USB CLIENT library to Codecraft #14

Closed
vongomben opened this issue Jan 21, 2024 · 9 comments
Closed

Add HID/USB CLIENT library to Codecraft #14

vongomben opened this issue Jan 21, 2024 · 9 comments
Assignees
Labels
CodeCraft Label for CodeCraft UAY Unassigned yet

Comments

@vongomben
Copy link
Contributor

vongomben commented Jan 21, 2024

It would be really cool to have the keyboard and mouse functionalities brought to Codecraft

https://wiki.seeedstudio.com/Wio-Terminal-USBCLIENT-Keyboard/

@vongomben vongomben changed the title Add HID library to Codecraft Add HID/USB CLIENT library to Codecraft Jan 21, 2024
@vongomben
Copy link
Contributor Author

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);
  }
}

MouseClick

@vongomben
Copy link
Contributor Author

vongomben commented Jan 22, 2024

These three commands corresponds to the three different Mouse.press()
The latter acts as Mouse.release()

MousePressed

MouseReleased

#include <Mouse.h>

void setup() {

  Mouse.begin();
}

void loop() {

  
    Mouse.press(MOUSE_LEFT);
    Mouse.press(MOUSE_RIGHT);
    Mouse.press(MOUSE_MIDDLE);

    Mouse.release();
  
}


@vongomben
Copy link
Contributor Author

vongomben commented Jan 22, 2024

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.

mousemove

@vongomben
Copy link
Contributor Author

vongomben commented Jan 22, 2024

Mouse.isPressed

Reports whether a button is pressed or not. Data type: bool.

mouseCondition

Mouse.end()

MouseClosed

@vongomben
Copy link
Contributor Author

vongomben commented Jan 22, 2024

Press a Specific Charaacter on the Keyboad, then release it as in [Keyboard.write()]
KeyboardWrite

#include <Keyboard.h>

void setup() {
 
  Keyboard.begin();
}

void loop() {

    Keyboard.write(character);
  }
}

@vongomben
Copy link
Contributor Author

More Keyboard functions:

Keyboard.press()

Keyboard.press(key)

KeyboardPress


Keyboard.release()

Keyboard.release(key)

KeyboardRelease


Keyboard.releaseAll()

KeyboardReleaseAll

@vongomben
Copy link
Contributor Author

Keyboard.end()

Keyboardclosed

@vongomben
Copy link
Contributor Author

Most important Keyboard.print() and Keyboard.println() the most useful one to write as in a keyboard.
KeyboardPintln

KeyboardPrint

@MatthewJeffson MatthewJeffson added UAY Unassigned yet CodeCraft Label for CodeCraft labels Oct 9, 2024
@baorepo
Copy link
Member

baorepo commented Oct 15, 2024

Can you send us a PR directly? @vongomben

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CodeCraft Label for CodeCraft UAY Unassigned yet
Projects
Status: Done
Development

No branches or pull requests

3 participants