yea, so the incoming keystrokes and mouse movements are managed through some custom OS X code as well.
the specific method we're using is CGEventPostToPSN, more information here: https://developer.apple.com/library/mac/documentation/Carbon...