Removed jquery and use keyup instead of keypress