autohotkey - Negating keypress in AHK -
i'm playing game , acts wonky when press 3 buttons @ same time. need resulting input of holding down "a s d" "s".
something
#singleinstance if getkeystate("a") if getkeystate("s") if getkeystate("d") input "s"
a simple, perhaps not short combination of hotkeys , up variants trick. script works intended, buttons a
, s
. when s
held down, a
nothing. when s
not held down, a
acquires previous state.
#singleinstance, force setbatchlines, -1 global a_down = false global s_down = false a:: a_down = true if( %s_down% = true ) return send, {a down} return up:: a_down = false if( %s_down% = true ) return send, {a up} return s:: s_down = true if( %a_down% = true ) send, {a up} send, {s down} return s up:: s_down = false if( %a_down% = true ) send, {a down} send, {s up} return
in spirit of stackoverflow, not post complete script work 3 keys. left exercise reader.
Comments
Post a Comment