Skip to content

Mouse and Keyboard combo issue #3207

@slkgtr

Description

@slkgtr
#include <Keyboard.h>
#include <MouseAbsolute.h>

void setup() {
  Serial.begin(115200);

  Keyboard.begin();

  MouseAbsolute.begin();
  
  delay(5000);
  Serial.printf("Press BOOTSEL to move the mouse in a series of circles\n");
}

void loop() {
  if (BOOTSEL) {
    Keyboard.print("ThisPasswordIsWeakLikeABaby");
    Serial.println("BARREL ROLLS!!!");
    float r = 1000;
    for (float cx = 1000; cx <= 16000; cx += 4000) {
      for (float cy = 1000; cy <= 16000; cy += 4000) {
        for (float a = 0.0f; a < 2.0f * 3.14159f; a += 0.1f) {
          float ax = r * cos(a);
          float ay = r * sin(a);
          MouseAbsolute.move(ax + cx, ay + cy, 0);
          delay(10);
        }
      }
    }
    while (BOOTSEL) {
      delay(1);
    }
  }
}

Windows 11, Arduino 2.3.4, Pico 5.4.0
This is the mouse and keyboard combo code.
Keyboard is working but the mouse is not working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions