For #1594: Replace keyup event with keypress event and input event 

Don't use keyup event, it's famous bad case for IME environment.
keypress event don't send event when IME on(eq. input japanese words), so I use to detect "press enter".
input event can send event when IME on and can enable real time update both IME on and off.
test environments: Firefox 21 and Google Chrome 27.0.1453.110 on Mac OSX Mountain Lion