I'm a new AutoHotKey user, and I've been Googling for the past couple hours for existing examples of what I'm trying to do, but nothing I've found works quite what I'm going for.

I just switched from MacOS to Windows 10 on a Surface Pro 6, and I'm trying to change the Windows modifier keys to act more like the Mac keyboard layout, where instead of Ctrl+[anything] it's Command+[anything]. On the keyboard I'm using, the current Alt key is in the place where the Command key would have been on the Mac, next to the spacebar. I want to use this Alt key for all Ctrl+[fill in the blank] shortcuts system-wide swapping Alt and Ctrl keys.

The tricky part is this. I want to keep Alt+Tab, Shift+Alt+Tab, Ctrl+Tab, and Shift+Ctrl+Tab exactly as they were, unchanged.

This is as close as I've been able to get, but it still has problems. If I keep the first 2 lines, I get the Ctrl and Alt key swapping, but with the 3 line, it seems to cancel out the first line Alt::Ctrl

LAlt & Tab::AltTab

I'm not usually one to post questions online. I prefer searching for other people's answered questions, but no luck so far. Any help would be appreciated.


Ok, so I've got a mostly complete solution for myself. I used SharpKeys to remap swap Left Control and Left Alt.

After that, all I need to do is swap Ctrl+Tab and Alt+Tab functionality using AutoHotKey. I mainly care about implementing AltTab as I'd rarely use ShiftAltTab. I also rarely use Ctrl+Tab to cycle through tabs either. So my incomplete solution is this:

#If GetKeyState("Shift", "P")
LCtrl & Tab::ShiftAltTab

#If !(GetKeyState("Shift", "P"))
LCtrl & Tab::AltTab

Currently only LCtrl & Tab::AltTab works, and the #If conditionals seem to be ignored. Any advice on why that is and how to fix it?


Now that I've been editing this a couple times. I see that I was using LAlt & Tab::AltTab instead of LCtrl & Tab::AltTab. That was one of the problems.

  • 2
    I normally post this for people who just moved from Win to Mac, but the essence is the same... Get used to it. Don't fight it, just learn the paradigm shift. It will be much easier in the long run. – Tetsujin Nov 21 '18 at 9:33
  • 1
    It's not about getting used to it. The position of the Command key is ergonomically superior to using Ctrl for 99% of keyboard shortcuts. Why should I make my hands do a dance when I can just use the keys that my fingers/thumbs already rest on? – Ryan Hart Nov 21 '18 at 11:35
  • Besides, I just came back to this page after getting an idea. I can use SharpKeys (I've used it on my gaming PC) to swap Ctrl and Alt. At this point, AutoHotkey won't know the difference, and I can then just switch Alt+Tab to Ctrl+Tab. – Ryan Hart Nov 21 '18 at 11:38
  • If you are on Windows then use it. Don't try to make it over, because the result will only be poor. The keyboard is too tightly coupled with applications on Windows & Mac. Buy another keyboard with better ergonomy if you wish. – harrymc Nov 21 '18 at 11:39
  • Anything is possible. And If it ain't broke, you just haven't thought of anything better yet. – Ryan Hart Nov 21 '18 at 13:04

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.