Added convenience functions for state types
closes #18. Ported mouse and keyboard input to OS X