MOUSE_INPUT_DATA to different Monitor.

Hi ,

i’m using mouclass callback in my WDM to send mouse input reports to windows
like this :

// Geting data from controller.
device.x = ( Data from controller );
device.y = ( Data from controller );

// Calibration
MyCalibRoutine(&display,&device,&pdx->matrix);

// MOUSE_INPUT_DATA
currentInput = &pdx->input;
currentInput->Flags=MOUSE_MOVE_ABSOLUTE;
currentInput->ButtonFlags=NULL;
currentInput->ExtraInformation=101;
currentInput->LastX=display.x*0xFFFF/pdx->Resolution;
currentInput->LastY=display.y*0xFFFF/pdx->Resolution;

if( it is a touch down and first
one )currentInput->ButtonFlags=MOUSE_RIGHT_BUTTON_DOWN;
if (it is a touch up)currentInput->ButtonFlags=MOUSE_LEFT_BUTTON_DOWN;

(*(PSERVICE_CALLBACK_ROUTINE)
pdx->ConnectData.ClassService) (
pdx->ConnectData.ClassDeviceObject,
currentInput,
currentInput+1,
&inputDataConsumed);

My question is the following , from a registry value i know i must send
mouse pointer to a certain monitor . how can i do that ?
let’s say the second monitor is on the right of the first one , do i have to
add 0xFFFF to X values ?
or are the 0xFFFF values for the desktop (so all monitors ) ?

thanks,

Ronan.

i found the solution to my problem with this Flag : MOUSE_VIRTUAL_DESKTOP in
the MOUSE_INPUT_DATA.
guessed i should reply to myself in case someone got a similar problem :stuck_out_tongue:
even if all of this sound very dumb .

Ronan .

“Launay Ronan” a écrit dans le message de
news:xxxxx@ntdev…
> Hi ,
>
> i’m using mouclass callback in my WDM to send mouse input reports to
windows
> like this :
>
> // Geting data from controller.
> device.x = ( Data from controller );
> device.y = ( Data from controller );
>
> // Calibration
> MyCalibRoutine(&display,&device,&pdx->matrix);
>
> // MOUSE_INPUT_DATA
> currentInput = &pdx->input;
> currentInput->Flags=MOUSE_MOVE_ABSOLUTE;
> currentInput->ButtonFlags=NULL;
> currentInput->ExtraInformation=101;
> currentInput->LastX=display.x0xFFFF/pdx->Resolution;
> currentInput->LastY=display.y
0xFFFF/pdx->Resolution;
>
> if( it is a touch down and first
> one )currentInput->ButtonFlags=MOUSE_RIGHT_BUTTON_DOWN;
> if (it is a touch up)currentInput->ButtonFlags=MOUSE_LEFT_BUTTON_DOWN;
>
> (*(PSERVICE_CALLBACK_ROUTINE)
> pdx->ConnectData.ClassService) (
> pdx->ConnectData.ClassDeviceObject,
> currentInput,
> currentInput+1,
> &inputDataConsumed);
>
> My question is the following , from a registry value i know i must send
> mouse pointer to a certain monitor . how can i do that ?
> let’s say the second monitor is on the right of the first one , do i have
to
> add 0xFFFF to X values ?
> or are the 0xFFFF values for the desktop (so all monitors ) ?
>
> thanks,
>
> Ronan.
>
>
>

You should not have to set MOUSE_VIRTUAL_DESKTOP, that is actually for terminal services. Your absolute pointing device coordinates will be scaled to the entire virtual desktop for the console. The virtual desktop is the bounding rectangle of all monitors. If you wanted to bound your touch screen to particular monitor, you would have to know the virtual desktop size and where that monitor was positioned within the virtual desktop. None of this information is available in kernel mode, you would have to have a user mode application / service running which would send you the virtual desktop size and the monitor position and then update the driver if the user changes the layout.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Launay Ronan
Sent: Monday, November 29, 2004 7:43 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] MOUSE_INPUT_DATA to different Monitor.

i found the solution to my problem with this Flag : MOUSE_VIRTUAL_DESKTOP in
the MOUSE_INPUT_DATA.
guessed i should reply to myself in case someone got a similar problem :stuck_out_tongue:
even if all of this sound very dumb .

Ronan .

“Launay Ronan” a ?crit dans le message de
news:xxxxx@ntdev…
> Hi ,
>
> i’m using mouclass callback in my WDM to send mouse input reports to
windows
> like this :
>
> // Geting data from controller.
> device.x = ( Data from controller );
> device.y = ( Data from controller );
>
> // Calibration
> MyCalibRoutine(&display,&device,&pdx->matrix);
>
> // MOUSE_INPUT_DATA
> currentInput = &pdx->input;
> currentInput->Flags=MOUSE_MOVE_ABSOLUTE;
> currentInput->ButtonFlags=NULL;
> currentInput->ExtraInformation=101;
> currentInput->LastX=display.x0xFFFF/pdx->Resolution;
> currentInput->LastY=display.y
0xFFFF/pdx->Resolution;
>
> if( it is a touch down and first
> one )currentInput->ButtonFlags=MOUSE_RIGHT_BUTTON_DOWN;
> if (it is a touch up)currentInput->ButtonFlags=MOUSE_LEFT_BUTTON_DOWN;
>
> (*(PSERVICE_CALLBACK_ROUTINE)
> pdx->ConnectData.ClassService) (
> pdx->ConnectData.ClassDeviceObject,
> currentInput,
> currentInput+1,
> &inputDataConsumed);
>
> My question is the following , from a registry value i know i must send
> mouse pointer to a certain monitor . how can i do that ?
> let’s say the second monitor is on the right of the first one , do i have
to
> add 0xFFFF to X values ?
> or are the 0xFFFF values for the desktop (so all monitors ) ?
>
> thanks,
>
> Ronan.
>
>
>


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

well i actually have a user mode app which while calibration set values in
registry about the touch screen monitor position .i needed a user mode
config panel anyways .
Is there any other way to scale the pointing device to another monitor than
the primary one w/o using MOUSE_VIRTUAL_DESKTOP ?

“Doron Holan” a écrit dans le message de
news:xxxxx@ntdev…
You should not have to set MOUSE_VIRTUAL_DESKTOP, that is actually for
terminal services. Your absolute pointing device coordinates will be scaled
to the entire virtual desktop for the console. The virtual desktop is the
bounding rectangle of all monitors. If you wanted to bound your touch
screen to particular monitor, you would have to know the virtual desktop
size and where that monitor was positioned within the virtual desktop. None
of this information is available in kernel mode, you would have to have a
user mode application / service running which would send you the virtual
desktop size and the monitor position and then update the driver if the user
changes the layout.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Launay Ronan
Sent: Monday, November 29, 2004 7:43 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] MOUSE_INPUT_DATA to different Monitor.

i found the solution to my problem with this Flag : MOUSE_VIRTUAL_DESKTOP in
the MOUSE_INPUT_DATA.
guessed i should reply to myself in case someone got a similar problem :stuck_out_tongue:
even if all of this sound very dumb .

Ronan .

“Launay Ronan” a écrit dans le message de
news:xxxxx@ntdev…
> Hi ,
>
> i’m using mouclass callback in my WDM to send mouse input reports to
windows
> like this :
>
> // Geting data from controller.
> device.x = ( Data from controller );
> device.y = ( Data from controller );
>
> // Calibration
> MyCalibRoutine(&display,&device,&pdx->matrix);
>
> // MOUSE_INPUT_DATA
> currentInput = &pdx->input;
> currentInput->Flags=MOUSE_MOVE_ABSOLUTE;
> currentInput->ButtonFlags=NULL;
> currentInput->ExtraInformation=101;
> currentInput->LastX=display.x0xFFFF/pdx->Resolution;
> currentInput->LastY=display.y
0xFFFF/pdx->Resolution;
>
> if( it is a touch down and first
> one )currentInput->ButtonFlags=MOUSE_RIGHT_BUTTON_DOWN;
> if (it is a touch up)currentInput->ButtonFlags=MOUSE_LEFT_BUTTON_DOWN;
>
> (*(PSERVICE_CALLBACK_ROUTINE)
> pdx->ConnectData.ClassService) (
> pdx->ConnectData.ClassDeviceObject,
> currentInput,
> currentInput+1,
> &inputDataConsumed);
>
> My question is the following , from a registry value i know i must send
> mouse pointer to a certain monitor . how can i do that ?
> let’s say the second monitor is on the right of the first one , do i have
to
> add 0xFFFF to X values ?
> or are the 0xFFFF values for the desktop (so all monitors ) ?
>
> thanks,
>
> Ronan.
>
>
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

What Doron tried to say is that if you for instance have:
2 monitors in 1280 x 1024 in “side-by-side” configuration, you should s=
cale
to 2560 x 1024. If they are “on top of each other”, you need to scale =
to
1280 x 2048.

If you have 4 monitors in a “square” configuration, 1280 x 1024, you wo=
uld
scale to 2560 x 2048.

If you have three monitors in an “L” shape, you’d still be scaling to 2=
560
x 2048.
Three monitors side-by-side would be 3840 x 1024.

There are other variations, but I think this will get you the idea.


Mats

xxxxx@lists.osr.com wrote on 11/30/2004 09:09:09 AM:

well i actually have a user mode app which while calibration set valu=
es
in
registry about the touch screen monitor position .i needed a user mod=
e
config panel anyways .
Is there any other way to scale the pointing device to another monito=
r
than
the primary one w/o using MOUSE_VIRTUAL_DESKTOP ?

“Doron Holan” a =E9crit dans le messag=
e de
> news:xxxxx@ntdev…
> You should not have to set MOUSE_VIRTUAL_DESKTOP, that is actually fo=
r
> terminal services. Your absolute pointing device coordinates will be=

scaled
> to the entire virtual desktop for the console. The virtual desktop i=
s
the
> bounding rectangle of all monitors. If you wanted to bound your touc=
h
> screen to particular monitor, you would have to know the virtual desk=
top
> size and where that monitor was positioned within the virtual desktop=
.
None
> of this information is available in kernel mode, you would have to ha=
ve a
> user mode application / service running which would send you the virt=
ual
> desktop size and the monitor position and then update the driver if t=
he
user
> changes the layout.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Launay Ronan
> Sent: Monday, November 29, 2004 7:43 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] MOUSE_INPUT_DATA to different Monitor.
>
> i found the solution to my problem with this Flag : MOUSE_VIRTUAL_DES=
KTOP
in
> the MOUSE_INPUT_DATA.
> guessed i should reply to myself in case someone got a similar proble=
m :stuck_out_tongue:
> even if all of this sound very dumb .
>
> Ronan .
>
> “Launay Ronan” a =E9crit dans le message de
> news:xxxxx@ntdev…
> > Hi ,
> >
> > i’m using mouclass callback in my WDM to send mouse input reports t=
o
> windows
> > like this :
> >
> > // Geting data from controller.
> > device.x =3D ( Data from controller );
> > device.y =3D ( Data from controller );
> >
> > // Calibration
> > MyCalibRoutine(&display,&device,&pdx->matrix);
> >
> > // MOUSE_INPUT_DATA
> > currentInput =3D &pdx->input;
> > currentInput->Flags=3DMOUSE_MOVE_ABSOLUTE;
> > currentInput->ButtonFlags=3DNULL;
> > currentInput->ExtraInformation=3D101;
> > currentInput->LastX=3Ddisplay.x0xFFFF/pdx->Resolution;
> > currentInput->LastY=3Ddisplay.y
0xFFFF/pdx->Resolution;
> >
> > if( it is a touch down and first
> > one )currentInput->ButtonFlags=3DMOUSE_RIGHT_BUTTON_DOWN;
> > if (it is a touch up)currentInput->ButtonFlags=3DMOUSE_LEFT_BUTTON_=
DOWN;
> >
> > (*(PSERVICE_CALLBACK_ROUTINE)
> > pdx->ConnectData.ClassService) (
> > pdx->ConnectData.ClassDeviceObject,
> > currentInput,
> > currentInput+1,
> > &inputDataConsumed);
> >
> > My question is the following , from a registry value i know i must =
send
> > mouse pointer to a certain monitor . how can i do that ?
> > let’s say the second monitor is on the right of the first one , do =
i
have
> to
> > add 0xFFFF to X values ?
> > or are the 0xFFFF values for the desktop (so all monitors ) ?
> >
> > thanks,
> >
> > Ronan.
> >
> >
> >
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=3D256
>
> You are currently subscribed to ntdev as: xxxxx@windows.microsoft.co=
m
> To unsubscribe send a blank email to xxxxx@lists.osr.com=

>
>
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.
> osronline.com/article.cfm?id=3D256
>
> You are currently subscribed to ntdev as: xxxxx@3dlabs.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com=

> ForwardSourceID:NT00008266=

i think i anderstood , but whatever monitors with whatever resolutions in
any configuration , you must provide a 0xFFFF * 0xFFFF coordinate to the
MOUSE_INPUT_DATA , and then windows maps it to the primary monitor , unless
you use the flag MOUSE_VIRTUAL_DESTKOP.
i was looking for a way to inform windows to maps those to a different
monitor .
because the touch monitor isnt necessarily the primary one .
sorry if i dont make any sense or if i seems to insist , english isnt my
primary language :frowning:

thanks ,
Ronan

“Mats PETERSSON” a écrit dans le message de
news:xxxxx@ntdev…

What Doron tried to say is that if you for instance have:
2 monitors in 1280 x 1024 in “side-by-side” configuration, you should scale
to 2560 x 1024. If they are “on top of each other”, you need to scale to
1280 x 2048.

If you have 4 monitors in a “square” configuration, 1280 x 1024, you would
scale to 2560 x 2048.

If you have three monitors in an “L” shape, you’d still be scaling to 2560
x 2048.
Three monitors side-by-side would be 3840 x 1024.

There are other variations, but I think this will get you the idea.


Mats

xxxxx@lists.osr.com wrote on 11/30/2004 09:09:09 AM:

> well i actually have a user mode app which while calibration set values
in
> registry about the touch screen monitor position .i needed a user mode
> config panel anyways .
> Is there any other way to scale the pointing device to another monitor
than
> the primary one w/o using MOUSE_VIRTUAL_DESKTOP ?
>
> “Doron Holan” a écrit dans le message de
> news:xxxxx@ntdev…
> You should not have to set MOUSE_VIRTUAL_DESKTOP, that is actually for
> terminal services. Your absolute pointing device coordinates will be
scaled
> to the entire virtual desktop for the console. The virtual desktop is
the
> bounding rectangle of all monitors. If you wanted to bound your touch
> screen to particular monitor, you would have to know the virtual desktop
> size and where that monitor was positioned within the virtual desktop.
None
> of this information is available in kernel mode, you would have to have a
> user mode application / service running which would send you the virtual
> desktop size and the monitor position and then update the driver if the
user
> changes the layout.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Launay Ronan
> Sent: Monday, November 29, 2004 7:43 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] MOUSE_INPUT_DATA to different Monitor.
>
> i found the solution to my problem with this Flag : MOUSE_VIRTUAL_DESKTOP
in
> the MOUSE_INPUT_DATA.
> guessed i should reply to myself in case someone got a similar problem :stuck_out_tongue:
> even if all of this sound very dumb .
>
> Ronan .
>
> “Launay Ronan” a écrit dans le message de
> news:xxxxx@ntdev…
> > Hi ,
> >
> > i’m using mouclass callback in my WDM to send mouse input reports to
> windows
> > like this :
> >
> > // Geting data from controller.
> > device.x = ( Data from controller );
> > device.y = ( Data from controller );
> >
> > // Calibration
> > MyCalibRoutine(&display,&device,&pdx->matrix);
> >
> > // MOUSE_INPUT_DATA
> > currentInput = &pdx->input;
> > currentInput->Flags=MOUSE_MOVE_ABSOLUTE;
> > currentInput->ButtonFlags=NULL;
> > currentInput->ExtraInformation=101;
> > currentInput->LastX=display.x0xFFFF/pdx->Resolution;
> > currentInput->LastY=display.y
0xFFFF/pdx->Resolution;
> >
> > if( it is a touch down and first
> > one )currentInput->ButtonFlags=MOUSE_RIGHT_BUTTON_DOWN;
> > if (it is a touch up)currentInput->ButtonFlags=MOUSE_LEFT_BUTTON_DOWN;
> >
> > (*(PSERVICE_CALLBACK_ROUTINE)
> > pdx->ConnectData.ClassService) (
> > pdx->ConnectData.ClassDeviceObject,
> > currentInput,
> > currentInput+1,
> > &inputDataConsumed);
> >
> > My question is the following , from a registry value i know i must send
> > mouse pointer to a certain monitor . how can i do that ?
> > let’s say the second monitor is on the right of the first one , do i
have
> to
> > add 0xFFFF to X values ?
> > or are the 0xFFFF values for the desktop (so all monitors ) ?
> >
> > thanks,
> >
> > Ronan.
> >
> >
> >
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.
> osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@3dlabs.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

> ForwardSourceID:NT00008266

IIRC, absolute pointing devices are not restricted to the primary device. They affect the entire virtual desktop. Are you sure that you are reporting 0xFFFF when you are at the extreme end of either direction? Perhaps you are cutting off the range accidentally.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Launay Ronan
Sent: Tuesday, November 30, 2004 5:36 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Re:MOUSE_INPUT_DATA to different Monitor.

i think i anderstood , but whatever monitors with whatever resolutions in
any configuration , you must provide a 0xFFFF * 0xFFFF coordinate to the
MOUSE_INPUT_DATA , and then windows maps it to the primary monitor , unless
you use the flag MOUSE_VIRTUAL_DESTKOP.
i was looking for a way to inform windows to maps those to a different
monitor .
because the touch monitor isnt necessarily the primary one .
sorry if i dont make any sense or if i seems to insist , english isnt my
primary language :frowning:

thanks ,
Ronan

“Mats PETERSSON” a ?crit dans le message de
news:xxxxx@ntdev…

What Doron tried to say is that if you for instance have:
2 monitors in 1280 x 1024 in “side-by-side” configuration, you should scale
to 2560 x 1024. If they are “on top of each other”, you need to scale to
1280 x 2048.

If you have 4 monitors in a “square” configuration, 1280 x 1024, you would
scale to 2560 x 2048.

If you have three monitors in an “L” shape, you’d still be scaling to 2560
x 2048.
Three monitors side-by-side would be 3840 x 1024.

There are other variations, but I think this will get you the idea.


Mats

xxxxx@lists.osr.com wrote on 11/30/2004 09:09:09 AM:

> well i actually have a user mode app which while calibration set values
in
> registry about the touch screen monitor position .i needed a user mode
> config panel anyways .
> Is there any other way to scale the pointing device to another monitor
than
> the primary one w/o using MOUSE_VIRTUAL_DESKTOP ?
>
> “Doron Holan” a ?crit dans le message de
> news:xxxxx@ntdev…
> You should not have to set MOUSE_VIRTUAL_DESKTOP, that is actually for
> terminal services. Your absolute pointing device coordinates will be
scaled
> to the entire virtual desktop for the console. The virtual desktop is
the
> bounding rectangle of all monitors. If you wanted to bound your touch
> screen to particular monitor, you would have to know the virtual desktop
> size and where that monitor was positioned within the virtual desktop.
None
> of this information is available in kernel mode, you would have to have a
> user mode application / service running which would send you the virtual
> desktop size and the monitor position and then update the driver if the
user
> changes the layout.
>
> d
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Launay Ronan
> Sent: Monday, November 29, 2004 7:43 AM
> To: Windows System Software Devs Interest List
> Subject: Re:[ntdev] MOUSE_INPUT_DATA to different Monitor.
>
> i found the solution to my problem with this Flag : MOUSE_VIRTUAL_DESKTOP
in
> the MOUSE_INPUT_DATA.
> guessed i should reply to myself in case someone got a similar problem :stuck_out_tongue:
> even if all of this sound very dumb .
>
> Ronan .
>
> “Launay Ronan” a ?crit dans le message de
> news:xxxxx@ntdev…
> > Hi ,
> >
> > i’m using mouclass callback in my WDM to send mouse input reports to
> windows
> > like this :
> >
> > // Geting data from controller.
> > device.x = ( Data from controller );
> > device.y = ( Data from controller );
> >
> > // Calibration
> > MyCalibRoutine(&display,&device,&pdx->matrix);
> >
> > // MOUSE_INPUT_DATA
> > currentInput = &pdx->input;
> > currentInput->Flags=MOUSE_MOVE_ABSOLUTE;
> > currentInput->ButtonFlags=NULL;
> > currentInput->ExtraInformation=101;
> > currentInput->LastX=display.x0xFFFF/pdx->Resolution;
> > currentInput->LastY=display.y
0xFFFF/pdx->Resolution;
> >
> > if( it is a touch down and first
> > one )currentInput->ButtonFlags=MOUSE_RIGHT_BUTTON_DOWN;
> > if (it is a touch up)currentInput->ButtonFlags=MOUSE_LEFT_BUTTON_DOWN;
> >
> > (*(PSERVICE_CALLBACK_ROUTINE)
> > pdx->ConnectData.ClassService) (
> > pdx->ConnectData.ClassDeviceObject,
> > currentInput,
> > currentInput+1,
> > &inputDataConsumed);
> >
> > My question is the following , from a registry value i know i must send
> > mouse pointer to a certain monitor . how can i do that ?
> > let’s say the second monitor is on the right of the first one , do i
have
> to
> > add 0xFFFF to X values ?
> > or are the 0xFFFF values for the desktop (so all monitors ) ?
> >
> > thanks,
> >
> > Ronan.
> >
> >
> >
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.
> osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@3dlabs.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

> ForwardSourceID:NT00008266


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com