Negative Inkey and the Mouse Wheel

Discussions related to mouse, keyboard and Graphical User Interface
Post Reply
KenDown
Posts: 119
Joined: Wed 04 Apr 2018, 06:36

Negative Inkey and the Mouse Wheel

Post by KenDown » Sun 16 Dec 2018, 18:03

Turning the mouse wheel generates ascii codes 140 and 141 depending on which way you turn it. I'm wondering if there are negative inkey values for the mouse wheel?

Thanks.

guest
Posts: 268
Joined: Mon 02 Apr 2018, 09:12

Re: Negative Inkey and the Mouse Wheel

Post by guest » Sun 16 Dec 2018, 18:19

KenDown wrote:
Sun 16 Dec 2018, 18:03
I'm wondering if there are negative inkey values for the mouse wheel?
What meaning would that have? INKEY with a positive (or zero) parameter returns information about events (keypresses and mouse wheel rotations) whereas INKEY with a negative parameter returns information about states (e.g. whether a key is currently pressed or not). Events and states are fundamentally different concepts: events are dynamic, they indicate that something happened at a certain point in time, whereas states are static, they just tell you how something is now. What states are associated with the mouse wheel? I can't think of any.

Of course on many two-button mice the mouse wheel (when pressed rather than rotated) behaves like the centre button of a three-button mouse. In that case there certainly is an associated negative INKEY value: −11. But that's unconnected with it being a wheel!

KenDown
Posts: 119
Joined: Wed 04 Apr 2018, 06:36

Re: Negative Inkey and the Mouse Wheel

Post by KenDown » Mon 24 Dec 2018, 05:03

Ok, thanks. That may clarify - though surely as you turn the wheel there is a moment when it is in the state of being turned (or is that too philosophical?)

p_m21987
Posts: 144
Joined: Mon 02 Apr 2018, 21:51

Re: Negative Inkey and the Mouse Wheel

Post by p_m21987 » Mon 24 Dec 2018, 17:46

KenDown wrote:
Mon 24 Dec 2018, 05:03
though surely as you turn the wheel there is a moment when it is in the state of being turned (or is that too philosophical?)
That moment lasts such a short amount of time that you would probably never be able to detect it.

Post Reply