Fixing handling of characters from keyboard events

This simpler filter for non-printable characters should fix #206 (may need a check on Windows).

Obvisouly, I sent a pulled request for the wrong branch, that should be going on :develop.