Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6602963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:56:35+00:00 2026-05-25T18:56:35+00:00

I am trying to remap Left Alt to Left Win and Left Win to

  • 0

I am trying to remap Left Alt to Left Win and Left Win to Left Alt in AutoHotKey.

But I also want to have Shift + F11 to toggle these two remaps.

I know I can do:

LAlt::LWin  
LWin::LAlt

but what I can’t figure out is the toggle. The following version fails:

Shift & F11::
Hotkey, LAlt, Toggle
Hotkey, LWin, Toggle
return

When I press Shift and F11, it will say:

---------------------------
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
--->    006: Hotkey,LAlt,Toggle
    007: Hotkey,LWin,Toggle
    008: Return
    009: Exit
    010: Exit
    010: Exit

---------------------------
OK   
---------------------------

I’ve been scratching my head for hours.. Any input will be greatly appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:56:36+00:00Added an answer on May 25, 2026 at 6:56 pm

    I’m sure it is more verbose than necessary, but I just tried this script and it does something like what you’re after. It might send you in the right direction, if nothing else.

    #NoEnv
    SendMode Input
    
    IsRemapEnabled := false
    SetRemapEnabled(false)
    
    SetRemapEnabled(toEnabled) 
    {
      global IsRemapEnabled := toEnabled
    }
    
    +F11::
      SetRemapEnabled(!IsRemapEnabled)
    return
    
    LAlt::
      if (IsRemapEnabled) 
      {
        Send,{LWin DOWN}
      } else 
      {
        Send,{LAlt DOWN}
      } 
    return
    
    LAlt up::
    
      if (IsRemapEnabled) 
      {
        Send,{LWin UP}
      } else 
      {
        Send,{LAlt UP}
      } 
    return
    
    LWin::
      if (IsRemapEnabled) 
      {
        Send,{LAlt DOWN}
      } else 
      {
        Send,{LWin DOWN}
      } 
    return
    
    LWin UP::
      if (IsRemapEnabled) 
      {
        Send,{LAlt UP}
      } else 
      {
        Send,{LWin UP}
      } 
    return
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to underline a header, but have it as a much thinner line than
Trying to do this sort of thing... WHERE username LIKE '%$str%' ...but using bound
i am not sure if my design have flaw but would like to know
Trying to find some information on this but am unable to get any results
Trying to execute a Powershell cmdlet from a MVC 3 Controller using impersonation but
I'm trying to use coq with ProofGeneral, but the built-in Verilog mode shadows *.v
I'm using the Command T plugin for vim and trying to remap a key.
I am trying to have a function return a boolean and an address in
I'm trying to remap the | (pipe) key to , (comma) and I tried
I'm trying to access physical memory directly for an embedded Linux project, but I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.