Please enter the commit message for your changes. Lines starting

Modified keypress to keyup.
Update UI.
Fix validating procedure.