Commands & Syntax > Commands > Keyboard >

www.MacroToolworks.com

Key UP - < key_up >() ... [Free]

 

Keyboard Key UP
<key_up>(Keyboard key,Extended)
Available in: Free edition

The "key_down" and "key_up" commands allows to send a keystroke to currently active window (target application).
Note: For inserting a text it is simpler to use "free text".

 

#

Parameter name

Parameter description

1

Keyboard key

The key to press/release such as A, B, 1, /, etc. For Shift, Ctrl, F1, etc., keys <shift>, <ctrl>, <F1> syntax needs to be used. In addition, the KC:XXX key code can be used (Note: The KC:XXX key code is showing in the main window in lower right area as keys are being hit).

2

Extended

If 1, the extended key pressed/released. Otherwise have to be 0.

 

Example (Macro Steps):

 

1

<#> <#> This command presses down "A" key and releases it one second later

2

Macro execution: ONLY COMMANDS

3

Keyboard Key DOWN Keyboard key=< shift>, Extended=No

4

Keyboard Key DOWN Keyboard key=A, Extended=No

5

WAIT wait "1000" ms (time is constant: "")

6

Keyboard Key UP Keyboard key=A, Extended=No

7

Keyboard Key UP Keyboard key=< shift>, Extended=No

Example (Plain Text):

 

<#> This command presses down "A" key and releases it one second later

<cmds>

<key_down>(<shift>,0)

<key_down>(A,0)

<wx>(1000)

<key_up>(A,0)

<key_up>(<shift>,0)