I had this situation today.
I went into an elevator while a man was running towards the elevator. According to "elevator etiquette", I was supposed to press the button "<>" to keep the door open.
But I couldn't tell the difference between "<>" and "><" and I got confused or fussy when I had to decide to press "<>" or "><" in a few second and I got it wrong. I pressed the button "><", which closes the elevator door faster, and the poor man just missed getting into it.
I felt bad after that mistake.
Is it correct to say "I pressed the wrong button in panic/ in confusion"?
Or do we have a common word to express that state?