Swapping Alt & Win, retaining all hotkeys

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
jimhoyle
Posts: 40
Joined: 19 Dec 2015, 15:49

Swapping Alt & Win, retaining all hotkeys

25 Jul 2020, 06:12

I got a MacBook, installed Windows on it, now I want to swap Alt & Win(key). This is easy:

LAlt::LWin
LWin::LAlt

But now many of my hotkeys are broken. For example, #e is supposed to open File Explorer, however with that swapping in place, all previous hotkeys related to those keys are broken. Pressing LAlt+e and LWin+e are now both alt+e in practice. Also, looking at osk.exe (On-Screen Keyboard), from osk's perspective both LAlt and LWin are LAlt (even though LWin evokes Start Menu). How to retain all previous hotkey functionality after this swapping? Including both default Windows hotkeys (like #e) and hotkeys I have in my .ahk scripts.
jimhoyle
Posts: 40
Joined: 19 Dec 2015, 15:49

Re: Swapping Alt & Win, retaining all hotkeys

25 Jul 2020, 14:09

Possibly the best solution is to remap using the registry remapping as described here: https://www.autohotkey.com/docs/misc/Remap.htm (I used SharpKeys for the remap). Pretty annoying that I have to logoff+logon when changing from MacBook's own keyboard to an external PC keyboard. Would be fantastic to find a solution for those registry remappings to apply without logoff/logon (or reboot). (Just ending and reloading explorer.exe didn't do the trick.)
jimhoyle
Posts: 40
Joined: 19 Dec 2015, 15:49

Re: Swapping Alt & Win, retaining all hotkeys

22 Aug 2020, 03:21

I found a solution that doesn't involve logoff/logon (or reboot). However, that solution is unreliable at certain situations in the long term. For just a couple of keypresses here and there, you possibly won't notice anything bad (even though On-Screen Keyboard will show some weird behavior). The solution that does this almost "authentic" key remapping is ATNSoft Key Remapper and Key Manager (both do the same thing). (Authentic meaning that you can keep your old AutoHotkey hotkeys and they should work even after the remapping, now with the remapped keys.)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Hugh Jars, Mateusz53, MrDoge, peter_ahk and 389 guests