Add FocusEvent support and fix build

Hi guys, this my first attempt to contribute to a open source project, if anything is wrong please tell me.

I'm using this implementation for focusevents in my project and works fine

About unit test KeyEventSource should never call anything if before an event fired.