fix handle-key-down behavior