Deprecate Keypress Event and Fix #5

Deprecate keypress event and fix #5.