Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:19 12 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Is it possible to detect mouse wheel rotation?

Author Message
Peter63
Regular Member

Joined: 28/07/2017
Location: Sweden
Posts: 66
Posted: 05:52am 10 Jul 2025
Copy link to clipboard 
Print this post

Is it possible to detect mouse wheel rotation?

I'm using: PicoMiteHDMI MMBasic USB RP2350A Edition V6.00.02

I am attaching my mouse test program.

mouse_test.zip

If it is possible to detect mouse wheel rotation what does the code for this look like.

/Peter63
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10240
Posted: 06:50am 10 Jul 2025
Copy link to clipboard 
Print this post

No: I haven't found a way to get it working for USB mice
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7864
Posted: 06:56am 10 Jul 2025
Copy link to clipboard 
Print this post

I *really* wanted this to be about a wheel for a pet mouse. I'm disappointed now. :(

I think what you want is the MOUSE SET command. The arguments are:
the USB channel
x-coordinate
y-coordinate
wheel count

so you might use it as:
MOUSE SET 2, Xpos, Ypos, wheel

I've never used this so I'm not sure, but that's how I'd do it according to the manual. Sorry, I have no working example code for you.


EDIT:
Thanks Peter. I assume that was for a PS2 mouse then?
Edited 2025-07-10 16:57 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10240
Posted: 07:02am 10 Jul 2025
Copy link to clipboard 
Print this post

The wheel works for PS2 mice - use the DEVICE(MOUSE 2,W) function
 
Amnesie
Guru

Joined: 30/06/2020
Location: Germany
Posts: 639
Posted: 09:31am 10 Jul 2025
Copy link to clipboard 
Print this post

  matherp said  The wheel works for PS2 mice - use the DEVICE(MOUSE 2,W) function


Yes, I can verify that. I use the mouse wheel detecting a lot with my PS/2 mouse.
Didn't knew that it won't work for USB! Hm...

Greetings
Daniel
Edited 2025-07-10 19:31 by Amnesie
 
Peter63
Regular Member

Joined: 28/07/2017
Location: Sweden
Posts: 66
Posted: 10:44am 10 Jul 2025
Copy link to clipboard 
Print this post

OK then I know. PS2 mouse works. Thanks for the quick response as usual.
/Peter63
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025