Fix some key press behaviors