UNO R4 HID descriptor interference btw Mouse & Joystick

I would like to use Mouse & Joystick on UNO R4 Minima.
& using following Joystick library & my simplified code.
Mouse cursor move x:-10 when Pin4 is LOW condition.
but when I include Joystick library, Mouse behavior is strange.
(+x,-y,scroll input are occurred although no command)

I think HID descripors of Mouse & Joystick are interfered.
Does anyone have ideas?

Joystick library

I also posted the issue to github repository


#include <Mouse.h>
#include "JoystickWin.h"

void setup() {
 Serial.begin(115200);
 while (!Serial && (millis() < 3000)) delay(10);
 pinMode(4,INPUT_PULLUP);
 Mouse.begin();
 JoystickWin.begin();
}
void loop() {
 if(digitalRead(4)==LOW){
  Mouse.move(-10,0,0);
 }
 delay(5);
}

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.