Making a mouse driver/handler..

This is a discussion on Making a mouse driver/handler.. within the Windows Programming forums, part of the Platform Specific Boards category; I have a 4-button logitech mouse and I wanted to customize the buttons alittle more than the driver that I ...

  1. #1
    Alipha
    Guest

    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
    Posts
    381
    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
    Alipha
    Guest

    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
    Location
    Groningen (NL)
    Posts
    2,386
    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

    msdn.microsoft.com

    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, 08: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, 09:55 PM
  4. Making a mouse hover button, API style
    By hanhao in forum C++ Programming
    Replies: 1
    Last Post: 05-27-2004, 07:17 AM
  5. Game Design Topic #2 - Keyboard or Mouse?
    By TechWins in forum Game Programming
    Replies: 4
    Last Post: 10-08-2002, 04:34 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21