Can Blitz detect non-standard mouse buttons?

Blitz3D Forums/Blitz3D Programming/Can Blitz detect non-standard mouse buttons?

PoliteProgrammer(Posted 2007) [#1]
Hi all!

I have a new mouse, and it has A LOT of buttons. It obviously has the left right and middle mouse buttons, but it also has two buttons on the side of the mouse for "back" and "forward" when web surfing and also has a multi-directional scroll wheel. It scrolls up/down if you roll the wheel up/down but also scrolls left and right if i *press* left or right on the wheel (i.e. left and right act like buttons).

I was just wondering if, by default, Blitz can detect any of these additional buttons, or, if not, whether a routine can be written to allow it to do so.

Thanks in advance!


Bouncer(Posted 2007) [#2]
Why don't you just try it out... if mousedown(button) then...


PoliteProgrammer(Posted 2007) [#3]
I just tried running this loop:


While not keyhit(1)
for i = 0 to 99

if mousedown(i)
print i
endif

next
wend
end


because I didn't know if they correspond sensibly to buttons 1, 2, 3, 4, 5, etc.

It only detects 1-3, unfortunately. Any suggestions on whether its possible to get the rest working?


b32(Posted 2007) [#4]
Maybe you could try api_GetASyncKeyState or api_GetKeyState ? It is a user32.dll function. I thought with index "1", it returns the left mousebutton.