I thought that Microsoft (stupidly, as usual) made it basically 'impossible' (besides a very restricted set of options) to add in a user-supplied filter driver / main driver / filtering application for the system's Mouse or Keyboard.
I think the idea was to avoid spyware.exe from hooking your keyboard and mouse and then recording you logging in to your bank or from injecting arbitrary command sequences into your system as keyboard / mouse input when you're not around / looking / controlling the process.
Obviously such rootkit-ware / spyware does EXIST and function on many MS OS variants, though I'm not sure if it basically has to patch / hack the system in undesirable / exploitive type ways to get that functionality to work in modern MS OSes.
To be clear, your application can RECEIVE system keyboard / mouse input when YOUR APPLICATION has input focus, but it can't (IIRC) hook / intercept / filter that input when your application DOESN'T have input focus. So basically it just gets an already filtered / processed copy of the data event messages WHEN the system decides it has focus, and it ISN'T hooking them at a system level. Obviously you can do whatever ACTIONS you want with the data WHEN you have input focus, but you can't in general send those "I have a new keyboard input / mouse input" messages BACK into the system for other applications to transparently/unknowingly use as keyboard/mouse input events.
I believe they have some kinds of device driver code signing / WHQL type requirements in some OSes (XP?, Vista?, maybe Win2k?) so that you can't even install your own device driver / filter code for a device that will be the system keyboard / mouse, you can only use the Microsoft originated or MS approved codes.
I THINK that's why (AFAIK) a lot of the keyboards and mouse devices that have "extra control" buttons actually appear as MULTIPLE USB HID devices, one device that's just a "basic" KB / MOUSE, and the OTHER device that just sends events corresponding to those "extra" buttons to do things like PREVIOUS, NEXT, BACK, RELOAD, MEDIA PLAYER, SLEEP, whatever. Then it's easier for 3rd parties (like Creative Labs or maybe YOU) to write control utility applications that intercept events on those extra button events without their application having focus at the time. However I think there may be a limited set / number / schema for those extra "keycodes" or whatever, so I'm not sure how easy it would be to do totally arbitrary things with them. Anyway the problem STILL exists that though your application CAN intercept those EXTRA HID input message codes for the AUXILIARY buttons NOT logically part of the SYSTEM MOUSE/KEYBOARD, you STILL cannot (easily/theoretically) take those button events and use them as MACROs to GENERATE SYSTEM INPUT MESSAGES that ACT LIKE Keyboard/Mouse input for OTHER applications which is IMHO one of the MAIN desirable uses for MACRO buttons in the first place.
so i.e. it'd be hard to bind the 5th mouse side button to send the keyboard input sequence ALT+F+P to the running application (e.g. to PRINT shortcut/macro for MS Office or whatever) when you hit that mouse button.
Though you could have your OWN program intercept that input and do something IT ITSELF can do / launch without involving the system KB/MOUSE data streams.