So, I'm trying to write a simple script in AutoHotKey that will use NumLock (which I matched with a capsule in my registry) as a switch to turn my directional keys into numpad nab keys. My script looks like this:
GetKeyState, state, NumLock, T if state = D { Up::Numpad8 Down::Numpad2 Left::Numpad4 Right::Numpad6 Enter::Numpad5 } if state = U { $Up::Up $Down::Down $Left::Left $Right::Right $Enter::Enter } Return
However, I get an error when Up is repeated on line 15. How can I tell AutoHotKey to return my keys to their original key designation? I tried to leave the "else" field empty, not the "if state = U" section, but when I switch again, the keys remain in their changed state. I am sure there is something simple that I am missing.
source share