added the keypress event