Thread: Making a mouse driver/handler..

  1. #1

    Making a mouse driver/handler..

    I have a 4-button logitech mouse and I wanted to customize the buttons alittle more than the driver that I have allows. Or, if you know of a driver that I can download that already does this, please let me know.

    I'm a Starcraft fan and I thought it would be cool to customize the 4th button to do A+click (which would do an "attack-move" in the game). Though the driver only allows for stuff like double click, scrolling, etc. So, I thought I could add that functionality.

    What kind of functions and API calls would I need to use to make an event handler for when the 4th button is pressed? And how would you put the "A" key in the keyboard buffer? Code would be very helpful, but all I would need would just be what functions and such to use so I can look them up on the internet and stuff.

    Thank you.

  2. #2
    Registered User
    Join Date
    Jan 2002
    Its a bit lower than the normal api goes.
    Download a copy of the ddk and take a look.
    If you own a piece of land and there is an volcano on it and it ruins a
    nearby town, do you have to pay for the property damage?

  3. #3

    sorry, DDK? What? Where?

    I don't know what DDK is, sorry.

    I'm also new to the Windows programming scene, though I'm quite able in the DOS programming area. I'd know what you would have to do there, hook the mouse interrupt handler, read the data from COM1, interpret it, and then add the keystroke to the keyboard buffer.

    Though I wouldn't think Windows would like you hooking interrupt vectors yourself, since it is a multi-tasking OS. If you hook the interrupt then another program unhooked their handler, the interrupt chain would be broken and most-likely crash Windows.

    I would assume there would be at least an API function to do that. Then one to add "A" to the keyboard buffer. I was hoping there would be more, but I guess the mouse API functions just apply to the location of the mouse and the two primary buttons.

    Though would the Logitech mouse driver provide some functions that I can use?

  4. #4
    Join Date
    Aug 2001
    Groningen (NL)
    The DDK is the device driver kit. There are several developer kits which you can use to make programming easier, the DDK is one of them.

    Take a look at

    And go to the DDK Documentation section. It has a lot of information on driver programming, I think you can find what you need here.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem in mouse position
    By Arangol in forum Game Programming
    Replies: 6
    Last Post: 08-08-2006, 07:07 AM
  2. making camera move with mouse
    By Ti22 in forum Game Programming
    Replies: 13
    Last Post: 01-16-2005, 08:56 AM
  3. Making a Mouse Click
    By r0ss in forum C Programming
    Replies: 1
    Last Post: 06-03-2004, 08:55 PM
  4. Making a mouse hover button, API style
    By hanhao in forum C++ Programming
    Replies: 1
    Last Post: 05-27-2004, 06:17 AM
  5. Game Design Topic #2 - Keyboard or Mouse?
    By TechWins in forum Game Programming
    Replies: 4
    Last Post: 10-08-2002, 03:34 PM