Hotkey as Switch and Start/Stop-Toggle
Reviving this for a Mac keyboard running Windows 7
This is a great thread, and the only productive one I can find on toggling.
I have a Macbook running Win7. When I use my external keyboard, the Windows key does its job, but when I use the built-in keyboard, I want my option key to be the Windows key. I've got it mapped just the way I want it (with the exception of the fn key not being my control key), except that I want to be able to toggle my remapping using a hotkey.
Here is what works:
LWin::LAlt RWin::RAlt LAlt::LWin RAlt::RControl
Here is my best attempt at what I want, using some of jonny's code (because I understand it best):
^!+z:: { if ((tog=="" && tog:=0) || tog ^= 1) { msgbox Toggle On } else { msgbox Toggle Off LWin::LAlt RWin::RAlt LAlt::LWin RAlt::RControl } }
The attempt at using jonny's code shows the msgboxes, but shouldn't. It should show one message when I hit the key combination, but not the second message when I hit the same key combo (i.e. not moving my fingers to the new positions for control-alt-shift).
Any help?