Using AutoHotKey scripting language is it possible to swap Alt and Ctrl keys and also retain native AltTab key behaviour?

StackOverflow https://stackoverflow.com/questions/17225842

  •  01-06-2022
  •  | 
  •  

Question

Currently I must Ctrl & Tab to perform a traditional AltTab.

I've already swapped my Alt and Ctrl keys. However, I still want to be able to AltTab traditionally

This is what I have so far:

LCtrl::Alt  
Alt::LCtrl

LCtrl & Tab::AltTab 
Was it helpful?

Solution

LCtrl & Tab::Send {Alt Down}{Tab}{Alt Up}

Is the simple answer and will switch between the last 2 open windows.

If you want proper functionality, you'll have to read: http://www.autohotkey.com/docs/commands/GetKeyState.htm and use it in conjuction with

GetKeyState, OutputVar, LCtrl
If OutputVar = "D"
  Send {Tab}

etc

OTHER TIPS

This is works for me

LControl & Tab::AltTab
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top