Keyboard now works with notepad
Corrected flags for KeyDown and KeyUp