title: Autohotkey: How to implement an exit sequence
body: <p>In order to end my custom keyboard mapping for coding, I have placed the following line at the bottom of my script:</p>
  
  <pre><code>Esc::ExitApp
  </code></pre>
  
  <p>However, a single keystroke (especially the Esc) happens too much for other reasons. Therefore, I would prefer a sequence of single keystrokes (not holding down any key) to exit the Autohotkey mapping, such as "Esc and then LCtrl" or "Esc, LCtrl and then again Esc"</p>
  
  <p>I have tried the idea from <a href="https://stackoverflow.com/questions/2096253/autohotkey-key-sequence-not-just-single-key-hotkey">AutoHotKey key SEQUENCE, not just single-key hotkey</a> :</p>
  
  <pre><code>Esc::
  Input Key, L1
  if Key=LCtrl 
  ExitApp  
  return
  </code></pre>
  
  <p>But it doesn't seem to do the trick: on pressing Esc and then LCtrl, the mapping doesn't stop. (Also, if I press Esc and then another key (not LCtrl) that next keystroke is ignored, something I would preferably not have.</p>