Modify pressing backspace when cmd endit field is empty pastes last command with up Arrow key pastes last command on keydown