I\'m trying to use autohotkey to simulate elements of Mac keyboard on a PC (Windows) keyboard. My muscle memory reaches for the Command key for simple tasks like copying and pas
Use
LAlt::LCtrl
this will replace LAlt
with LCtrl
Just checked this on Win-7 and it works, even with IE.
00 00 00 00 00 00 00 00 03 00 00 00 1d 00 38 00 38 00 1d 00 00 00 00 00 00
Here is the SwapCtrlAlt.reg text.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,1d,00,38,00,38,00,1d,00,\
00,00,00,00,00
you could also swap the two buttons.
Something like:
LAlt::LCtrl
LCtrl::LAlt
In the limited testing I did, it works, but you might need to relearn some of your window key shortcuts. It basically just swaps the two buttons.
Use
LAlt::LCtrl
put it into a ahk file compile it and run .exe with administrator rights
right click -> Run as administrator
I tested it on Windows 7 and it works, LAlt no longer fires anywhere and it is completely replaced with LCtrl.
It sounds like you need the wildcard modifier. This will make it so if your hotkey is pressed in conjunction with another key. The mapping still works. Give the following a try:
*LAlt::LCtrl
This will make Alt fire Ctrl for any Alt+Key combination.
I am afraid that IE behaves differently from most other applications. You could try the instructions below. This is NOT autoHotKey but regedit changes. B.t.w. I had checked to see if ScanCodes would work (SC38 for LAlt), but IE still ignores that.
Not sure if this works in Vista/Win7/8, but worth a look.
http://www.designcodeexecute.com/2006/11/04/swap-alt-and-ctrl-keys-in-windows-xp/