Try keydown (instead of keyup)