For Windows, at any rate, one fix is somewhere along this path, but I'm still on the lookout for a more pd-centric solution:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/UserInput/RawInput/AboutRawInput.asp
rs