Fix NullPointerException on Windows 8.
Merge pull request #6 from shrt/master

Keyboard NullPointerException fix