Friday, April 21, 2017

Autohotkey Keystroke/hotkey problem


This was a comment i left for someone and realize it is a full blown question. It is to remap a game key from numpad4 to something i quickly can press.


I couldnt figure this out. It seems like it doesnt recognize shift (i tried using shift o and then O:: with no luck). Then i tried ::df:: (as in press them at the same time to trigger) but it looks like it triggers when i write df then a non alphabet character after it. And shift, ctrl, etc which i can hit with my pinky quickly doesnt count. How do i write a trigger i can hit quickly with my left hand? Currently my file is ::df::Send {Numpad4}


Answer



The ::df::... type of definition is an AutoHotkey hotstring, which is used for expanding abbreviations automatically, but it sounds like you want to stick with hotkeys.


As explained on the hotkeys page, AutoHotkey uses special symbols for modifier keys: ^ for Ctrl, + for Shift, ! for Alt, and # for the Windows key.


You can use & to make other keys act as modifiers, for example d & f will make the d key become a modifier key. But this causes the d key to lose its original function. As explained on the hotkeys page, you can use something like d::Send d to have the d key function normally when you release the key.


So to do what you want, you might use something like +o::Send {Numpad4} or d & f::Send {Numpad4}.


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...