Bind to keydown instead of keyup in equation editor