I am trying to make the windows and alt keys swap when I am using REAPER so that my shortcuts on the PC are typed the same (as in the same keyboard locations by muscle memory) as when I am using it on the Mac.

In other words, on a Windows/PC keyboard, the alt key is in the location where the command key is on the Mac keyboard, and the windows key is in the location of the option key. Since the corresponding/cross-platform mapping for these keys is actually alt=option and command=windows, I just need to remap each of these modifier keys to the other so that, when used alone or in combination with any other keys or modifiers, and only when I'm using REAPER, pressing the alt key will always send a windows keypress, and pressing the windows key will always send alt.

I have tried the following, but it doesn't seem to work:

#IfWinActive ahk_class reaper

I've also tried this:

#IfWinActive ahk_exe reaper.exe

But that doesn't work either.

The main problem is that there can be any number of different windows open/active in REAPER, and most of them have a different title and class. So I really need this modifier keyswap to be dependent on the active process and not the active window. The ahk_exe that is shown in Window Spy when REAPER is the active process is reaper.exe.

Someone PLEASE help me out here. I'm losing my mind from going between work and home and constantly forgetting shortcuts, or hitting the wrong ones and doing things I don't want to be doing.


1 Answer 1

  • "!" and "#" are the modifier symbols for the Alt- and the windows-key.

  • Modifier symbols are used only in key-combinations in order to modify other keys.

  • Unlike Control/Alt/Shift, there is no generic/neutral "Win" key because the OS does not support it. (See Modifier_keys)

In this case you have to use the full name of those keys, otherwise AHK remaps the literal keys/characters ! to # and # to !:

#IfWinActive ahk_exe reaper.exe



You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .