Fixed faulty scanning sequence after changing keyboard layout.
Fixed keyboard special keys.
Fixed null pointer exception.
Merge pull request #125 from ericwan78/issue-123

Fixed faulty scanning sequence