change to catch keydown instead of keypress