after you gave him your "clever" answer, you should have followed up with mentioning that keypress is the wrong event to use, but rather "keyup", since keypress varies across browsers and doesn't account for the holding down of keys. try holding down a key in your demo to see what happens :)