From: Ree on
VOID MouseInvert_ServiceCallback(PDEVICE_OBJECT pDeviceObj,
PMOUSE_INPUT_DATA InputDataStart, PMOUSE_INPUT_DATA InputDataEnd, PULONG
InputDataConsumed)
{
PMOUSE_INPUT_DATA InputDataCur;
PDEVICE_EXTENSION pDevExt = (PDEVICE_EXTENSION)pDeviceObj->DeviceExtension;

InputDataCur = InputDataStart;
while(InputDataCur < InputDataEnd){

if(pDevExt->bEnabled == TRUE){
if((InputDataCur->Flags & MOUSE_MOVE_RELATIVE) == MOUSE_MOVE_RELATIVE){
//invert the raw X,Y
InputDataCur->LastX = ~(InputDataCur->LastX - 1 );
InputDataCur->LastY = ~(InputDataCur->LastY - 1 );

//Invert vertical wheel on mouse
if((InputDataCur->ButtonFlags & MOUSE_WHEEL) == MOUSE_WHEEL){
InputDataCur->ButtonData = ~(InputDataCur->ButtonData -1);
}


My question here is how to detect the horizontal scroll from mouse? I
managed to add a filter driver with inverting X, Y, vertical wheel, mouse
click. But I cannot detect the horizontal wheel (tilt). I use the command
stated below:

if((InputDataCur->ButtonFlags & MOUSE_HWHEEL) ==
MOUSE_HWHEEL){InputDataCur->ButtonData = ~(InputDataCur->ButtonData -1);}

It failed to detect the horizontal tilt press. Please advice.

Thank you
From: Doron Holan [MSFT] on
it does not look like the hid mapper driver even sends MOUSE_HWHEEL.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Ree" <Ree(a)discussions.microsoft.com> wrote in message
news:28BDABA0-22F7-4633-910A-A9FB6C84C35E(a)microsoft.com...
> VOID MouseInvert_ServiceCallback(PDEVICE_OBJECT pDeviceObj,
> PMOUSE_INPUT_DATA InputDataStart, PMOUSE_INPUT_DATA InputDataEnd, PULONG
> InputDataConsumed)
> {
> PMOUSE_INPUT_DATA InputDataCur;
> PDEVICE_EXTENSION pDevExt =
> (PDEVICE_EXTENSION)pDeviceObj->DeviceExtension;
>
> InputDataCur = InputDataStart;
> while(InputDataCur < InputDataEnd){
>
> if(pDevExt->bEnabled == TRUE){
> if((InputDataCur->Flags & MOUSE_MOVE_RELATIVE) == MOUSE_MOVE_RELATIVE){
> //invert the raw X,Y
> InputDataCur->LastX = ~(InputDataCur->LastX - 1 );
> InputDataCur->LastY = ~(InputDataCur->LastY - 1 );
>
> //Invert vertical wheel on mouse
> if((InputDataCur->ButtonFlags & MOUSE_WHEEL) == MOUSE_WHEEL){
> InputDataCur->ButtonData = ~(InputDataCur->ButtonData -1);
> }
>
>
> My question here is how to detect the horizontal scroll from mouse? I
> managed to add a filter driver with inverting X, Y, vertical wheel, mouse
> click. But I cannot detect the horizontal wheel (tilt). I use the command
> stated below:
>
> if((InputDataCur->ButtonFlags & MOUSE_HWHEEL) ==
> MOUSE_HWHEEL){InputDataCur->ButtonData = ~(InputDataCur->ButtonData -1);}
>
> It failed to detect the horizontal tilt press. Please advice.
>
> Thank you

From: Doron Holan [MSFT] on
i take that back, it does send this value. perhaps you do not have a mouse
which reports a horizontal scroll wheel

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Doron Holan [MSFT]" <doronh(a)online.microsoft.com> wrote in message
news:e%23bF20LoIHA.1768(a)TK2MSFTNGP03.phx.gbl...
> it does not look like the hid mapper driver even sends MOUSE_HWHEEL.
>
> d
>
> --
> Please do not send e-mail directly to this alias. this alias is for
> newsgroup purposes only.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>
> "Ree" <Ree(a)discussions.microsoft.com> wrote in message
> news:28BDABA0-22F7-4633-910A-A9FB6C84C35E(a)microsoft.com...
>> VOID MouseInvert_ServiceCallback(PDEVICE_OBJECT pDeviceObj,
>> PMOUSE_INPUT_DATA InputDataStart, PMOUSE_INPUT_DATA InputDataEnd, PULONG
>> InputDataConsumed)
>> {
>> PMOUSE_INPUT_DATA InputDataCur;
>> PDEVICE_EXTENSION pDevExt =
>> (PDEVICE_EXTENSION)pDeviceObj->DeviceExtension;
>>
>> InputDataCur = InputDataStart;
>> while(InputDataCur < InputDataEnd){
>>
>> if(pDevExt->bEnabled == TRUE){
>> if((InputDataCur->Flags & MOUSE_MOVE_RELATIVE) == MOUSE_MOVE_RELATIVE){
>> //invert the raw X,Y
>> InputDataCur->LastX = ~(InputDataCur->LastX - 1 );
>> InputDataCur->LastY = ~(InputDataCur->LastY - 1 );
>>
>> //Invert vertical wheel on mouse
>> if((InputDataCur->ButtonFlags & MOUSE_WHEEL) == MOUSE_WHEEL){
>> InputDataCur->ButtonData = ~(InputDataCur->ButtonData -1);
>> }
>>
>>
>> My question here is how to detect the horizontal scroll from mouse? I
>> managed to add a filter driver with inverting X, Y, vertical wheel, mouse
>> click. But I cannot detect the horizontal wheel (tilt). I use the command
>> stated below:
>>
>> if((InputDataCur->ButtonFlags & MOUSE_HWHEEL) ==
>> MOUSE_HWHEEL){InputDataCur->ButtonData = ~(InputDataCur->ButtonData -1);}
>>
>> It failed to detect the horizontal tilt press. Please advice.
>>
>> Thank you
>

From: wingkinyeoh on
Hi Doron,

This calling routine correct?

if((InputDataCur->ButtonFlags & MOUSE_HWHEEL) == MOUSE_HWHEEL)
{
//to do list:
}

I add this filter driver to the basic mouse class driver. I do no
install any driver from the manufacture. I am sure that the Hardware
does provide this tilt horizontal button.
Later i will try on microsoft mouse to investigate more on this.

Please advice.
From: Doron Holan [MSFT] on
the flag check you have is correct for checking for a horizontal wheel

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


<wingkinyeoh(a)gmail.com> wrote in message
news:691f2df9-2565-44c1-bc12-116931b9e5db(a)b64g2000hsa.googlegroups.com...
> Hi Doron,
>
> This calling routine correct?
>
> if((InputDataCur->ButtonFlags & MOUSE_HWHEEL) == MOUSE_HWHEEL)
> {
> //to do list:
> }
>
> I add this filter driver to the basic mouse class driver. I do no
> install any driver from the manufacture. I am sure that the Hardware
> does provide this tilt horizontal button.
> Later i will try on microsoft mouse to investigate more on this.
>
> Please advice.