Writing a 5 buttons mouse driver

I think that writing a driver for my network card will be a bit hard
for me, so to learn how to write a driver on QNX and get the basics
I would like to write a driver for my 5 buttons mouse, starting
from a 3 buttons mouse driver. Btw, my mouse is a Microsoft
IntelliMouse Optical. (I must admit that for the mice and the keyboards
Microsoft is not too bad).

But will the 2 additionnal buttons be usable then ? I mean could they
be used for example to be equivalent as pressing the back and forward
button is a brower ?

I think it can be done, but probably more complexe then writing a network driver, lol!

Why do you think it would be more complex ? Couldn’t we just look
at how the 3 buttons are handled, and just a 2 more of them in
the same way ?

So, what would be the easiest driver I could write to train myself ?

The buttons have to be read that easy. But then the event associate with the button needs to be forwarded by the GUI to the applications. How to you turn a button event into a “back” in your browser? The GUI as support for CLICK and MENU button but it doesn’t have any support (AFAIK) for other mouse event.

A network driver isn’t so bad assuming you know the hardware (that’s were the problem really is).

What is it that you need to train yourself to? IF you need to one day write you own driver for some special hardware, unless one of the DDK can be use, you will have to write from scratch. Unlike most OS there is no specific requirement to write a driver. A driver is just another program.

Mario’s correct. The driver would be easy (so easy that it would hardly provide much enlightenment). The fun starts when you need to integrate the extra buttons into the GUI. Adding the extra buttons for a custom app wouldn’t be bad, but to make them generally useful by the GUI, it would get fairly complex.

Actually Photon is pretty cool, there is a capability structure kept for the pointing device that applications can query to find out what it can do. IIRC a pointing device can have up to 32 buttons.

So you think it should be part of the app to know that the 4th and 5th button mean
“back” and “forward” ? I would very much like this feature in Voyager, as it’s really
useful. Thanks for your answers.

That’s one way of doing it, or somehow the button could be translated to some other type of event and that’s were it could get nasty -)