3 ms·
Perhaps we need a better example? Detecting "esc" is simple: it is its own key code (ASCII 27.) Detecting "esc" and another key is more difficult because it is
by icedchai 2y ago
Perhaps we need a better example? Detecting "esc" is simple: it is its own key code (ASCII 27.) Detecting "esc" and another key is more difficult because it is not a modifier, like shift or control, so you'll have to do it yourself.
- lmz 2y agoI think the issue is that ESC is also a prefix for other keys. Which leads to the question: is this just an escape or is this a prefix of e.g. a cursor key? This can only be answered by timing.