Improved non numeric key functionality

Changed keypress event to be a keydown event, so the delete and '.' keys
weren't misinterpreted as each other.

Carat position doesn't get set if inserting a '.', or holding/releasing
a shift/ctrl/alt key.