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

About unit test KeyEventSource should never call anything if before an event fired.