Hi everyone,
I would like to detect mouse double click and (almost) simultaneous click of
two or more buttons in moufiltr. Do I need a timer for that or I can do it
by detecting the bits in ButtonFlags in the same or consecutive
MOUSE_INPUT_DATA?
Thanks in advance.
Liang Fu

Re: How to detect mouse double click and simultaneous click by Ray

Ray
Tue Mar 15 17:40:41 CST 2005

I'm not sure I understand what you mean.

Each MOUSE_INPUT_DATA will contain information from a single packet and
will have the button transition bits relevant to that packet, and the
order of them will be preserved from the viewpoint of a moufiltr/style
driver. No packets are "combined" or anything like that. Does that
answer the question?

Liang Fu wrote:
> Hi everyone,
> I would like to detect mouse double click and (almost) simultaneous click of
> two or more buttons in moufiltr. Do I need a timer for that or I can do it
> by detecting the bits in ButtonFlags in the same or consecutive
> MOUSE_INPUT_DATA?
> Thanks in advance.
> Liang Fu
>
>

--
../ray\..

Re: How to detect mouse double click and simultaneous click by Maxim

Maxim
Wed Mar 16 06:48:54 CST 2005

> two or more buttons in moufiltr. Do I need a timer for that or I can do it
> by detecting the bits in ButtonFlags in the same or consecutive
> MOUSE_INPUT_DATA?

Just call KeQuerySystemTime when the next MOUSE_INPUT_DATA arrives to your
driver. Then subtract the values when the next data will arrive. This is the
kind of "timer" you need.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com



Re: How to detect mouse double click and simultaneous click by Doron

Doron
Wed Mar 16 10:37:13 CST 2005

you would compare the change in ButtonFlags in 2 consecutive
MOUSE_INPUT_DATA. the problem here is that double click times are a per
user setting and the driver does not know what it is.

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.


"Liang Fu" <liang_fu_dr@hotmail.com> wrote in message
news:%23Lra68ZKFHA.3336@TK2MSFTNGP09.phx.gbl...
> Hi everyone,
> I would like to detect mouse double click and (almost) simultaneous click
> of
> two or more buttons in moufiltr. Do I need a timer for that or I can do it
> by detecting the bits in ButtonFlags in the same or consecutive
> MOUSE_INPUT_DATA?
> Thanks in advance.
> Liang Fu
>
>



Re: How to detect mouse double click and simultaneous click by Ray

Ray
Wed Mar 16 11:10:36 CST 2005

Depending on what he's trying to do :-)...

1) if you want to *generate* a double click, calling the service
callback once with a buffer containing 4 packets of the form
down/up/down/up will generate a double-click regardless of what the user
setting is (unless there's a way for a user to disable them entirely...
I don't remember).

2) if you're *detecting* double clicks, you *really* need to know the
user's double click time, so have a user mode app monitor that (remember
it can change during operation) and send an IOCTL to a device object
your filter creates.

Doron Holan [MS] wrote:
> you would compare the change in ButtonFlags in 2 consecutive
> MOUSE_INPUT_DATA. the problem here is that double click times are a per
> user setting and the driver does not know what it is.
>
> d
>

--
../ray\..

Re: How to detect mouse double click and simultaneous click by Liang

Liang
Wed Mar 16 12:04:16 CST 2005

Hi everyone,
Thank you so much for your kind help. I will try with your suggestions.
Liang Fu

"Liang Fu" <liang_fu_dr@hotmail.com> wrote in message
news:%23Lra68ZKFHA.3336@TK2MSFTNGP09.phx.gbl...
> Hi everyone,
> I would like to detect mouse double click and (almost) simultaneous click
of
> two or more buttons in moufiltr. Do I need a timer for that or I can do it
> by detecting the bits in ButtonFlags in the same or consecutive
> MOUSE_INPUT_DATA?
> Thanks in advance.
> Liang Fu
>
>