Cocoa input

I've added the keyboard inputs to cocoa, one thing that I'm not too happy with is the use of statics to keep trace of the modifier keys pressed. I can refactor this later on.

There's also the window events missing (resize, move, closed), but the solution I've found requires inheriting the NSWindow class, so I'd like to find a solution which wouldn't involve writing Objective-C code, if possible.