title: Autohotkey macro: trying to remap left-alt to left-win; left-win to left-win with a toggle
body: <p>I am trying to remap Left Alt to Left Win and Left Win to Left Alt in AutoHotKey.</p>
  
  <p>But I also want to have Shift + F11 to toggle these two remaps.</p>
  
  <p>I know I can do:  </p>
  
  <pre><code>LAlt::LWin  
  LWin::LAlt
  </code></pre>
  
  <p>but what I can't figure out is the toggle. The following version fails:</p>
  
  <pre><code>Shift &amp; F11::
  Hotkey, LAlt, Toggle
  Hotkey, LWin, Toggle
  return
  </code></pre>
  
  <p>When I press Shift and F11, it will say:</p>
  
  <pre><code>---------------------------
  test.ahk
  ---------------------------
  Error:  Nonexistent hotkey.  The current thread will exit.
  
  Specifically: LAlt
  
      Line#
      001: Return
      002: SetKeyDelay,-1
      002: Send,{Blind}{LAlt DownTemp}
      002: Return
      002: SetKeyDelay,-1
      002: Send,{Blind}{LAlt Up}
      002: Return
  ---&gt;    006: Hotkey,LAlt,Toggle
      007: Hotkey,LWin,Toggle
      008: Return
      009: Exit
      010: Exit
      010: Exit
  
  ---------------------------
  OK   
  ---------------------------
  </code></pre>
  
  <p>I've been scratching my head for hours.. Any input will be greatly appreciated!</p>