Several ways to do this. If there's a behavior in your script that you want to trigger or toggle, you can do this.
Code: Select all
/custombind add ToggleEKey
/custombind set ToggleEKey /varset EKey ${If[${EKey},0,1]}
/bind ToggleEKey e
be sure to
in your macro or config files. If there's some behavior you want to continue WHILE you have the key held down, and then stop as you release it, use
Code: Select all
]/custombind add ToggleEKey
/custombind set ToggleEKey /varset EKey 1
/custombind set ToggleEKey-up /varset EKey 0
/bind ToggleEKey e
instead.
You could also do something like
Code: Select all
/custombind set EKeyStuff /echo Please do the EKey stuff now.
and then in your macro
Code: Select all
#event EKeyHit [MQ2] Please do the EKey stuff now.
Sub Event_EKeyHit
blah blah blah
/return
to make an event, but this will spam your MQ window whenever you hit a key. Something like this could also be done using timers.
Either method will also work if you want to queue up multiple events, like "nuke 4 times if I spam the key 4 times", just use some '/varcalc EKey +1' action in there somewhere, and reduce the counter each time you handle the event.