Mouse.moveTo and multiscreen system

johnnyfp

Well-known member
Hi,

I'm trying out the absolute mouse positioning of the teensy but cannot seem to get the coordinates outside the primary display (Screen 4 in the below image).

Using 1.6.0 - Teensy 1.2.1-beta7 and a Handbuilt Teensy LC.

My screen setup is as shown
screen.PNG

Each screen is 1920x1080 except for screen 5 which is only 1680x1050. All running on Win7 Machine.

I've tried the the following code and the only movement I get is on the primary screen. When setting the screen resolution to 1920 the mouse moves to the center of the primary screen as expected but then to the right of the primary screen for the rest.
If I set the screen resolution to 7680 the point moves a quarter of the distance on the primary screen.

Is there a limitation for multiple screen system using absolute positioning?

Code:
void setup() {
  // put your setup code here, to run once:
  Mouse.screenSize(7680,2160); // Assumed resolution
  //Mouse.screenSize(1920,1080); // One display resolution
  
  for (int b=0;b<4;b++) {
    for (int a=0;a<4;a++) {
      Mouse.moveTo(960+(1920*a),540);
      delay(1000);
    }
  }
  
}

void loop() {
  ;
}

I've set the IDE to Keyboard,Mouse,Joystick HID. (For some reason if I add Serial, it does not work).
 
Back
Top