Listen to "input" event rather that "keyup"

This has lots of advantages:
  - "input" fires while the key is still pressed;
  - "input" fires when a character is removed with backspace (unlike "keypress");
  - "input" fires when the text is altered with the mouse (no keyboard events can handle it);
  - "input" does not fire if the keystroke does not result in a cnahge of the text (modifier keys).