First pass at keyboard and mouse events. They work, but probably still have bugs.

intParam4 is now set internally in sendNativeEvent.