ISXEQ:Keypress (command)

From ISMods Wiki

Contents

Syntax

Keypress <eqcommand|keycombo> [hold|chat]

Description

Keypress performs a keypress event or action that can be associated with an event. It can be used on actual keys or any bindable action in the UI.

Keypress [...] hold will press and hold the key down until it is released either via script or by physically pressing the key on the keyboard. Call Keypress <samekey> without hold to remove the hold via script.

Keypress [...] chat will send the key(s) to the chat window.

NOTES: Hold and chat cannot be combined, and chat is invalid when used with eqcommands (bindable actions).

Examples

Keypress alt+1 Will by default cast the spell in spell slot 1.

Keypress CAST1 Will cast the spell in spell slot 1, even if alt+1 isn't the bound key sequence.

Holding a key down
{
Keypress FORWARD hold ;move towards my target
do
{
   ${Target:Face[fast]}
   waitframe
}
while ${Target.Distance} > 35
Keypress FORWARD ;stop moving
}

See Also