How to distinguish between Escape and Escape Sequence
问题 My end goal is to distinguish between my pressing Esc (ASCII 27 ) on my keyboard, and me pressing the → key on my keyboard (which translates to a sequence of 27 91 67 ). I am using termios to put my terminal into non-Canonical mode. I think I understand there are two options: Wait some arbitrary amount of time to see if something comes in (seems hacky) Check STDIN to see if it is empty I'm trying to do the latter. To that end, I'm trying to use select to see if stdin is empty or not. The