There's no general way of overriding mouse/keyboard events in OS X. That's actually a fairly vague question because it really depends on what you are trying to do with the events.
With that in mind, I'll answer your specific example, please understand that if you wanted a different type of override (for example, not one that deals with window movement/resizing) the answer might be completely different.
There are two ways of moving windows around on OS X, both rely on hacking into undocumented portions of the OS, and both require you to inject code into the applications you want to affect.
The first method is to inject your code into the Dock process that can be used to control all windows. The Dock has a special, magic connection to the WindowServer that lets it do things to all windows (this is how Expose works). The internal Dock functions (actually CoreGraphics private functions) are completely undocumented, but some folks have reverse engineered some of the calls. This is the method used by Desktop Manager (
http://wsmanager.sf.net) and its derivatives like GeekBind (
http://geekbind.sf.net).
The other option is to inject your code into every running application and modify each application's behavior appropriately. Specifically one patches various WindowServer-related functions at runtime with your own customized version. Bear in mind that in many cases you will need to patch functions lower than the documented API (patching framework internals). This is apparently the approach used by Unsanity's WindowShade X and their other products.
Of course you also need a method to inject your code. Unsanity's Application Enhancer Framework (APE) is one option, it handles a lot of the heavy lifting for you. The other option is mach_inject which does much the same thing, but is perhaps not as polished (you have to do more work). Desktop Manager is mach_inject based, Unsanity's products are APE based. Sample code exists for each.
In general this stuff is all deep voodoo, not for the faint of heart. Its all undocumented, and though Apple's documentation is quite good none of this stuff is covered.
Good luck,
Alex