commandKey

returns the state of the Command key.

# Metadata

Platforms: desktop, server OS: mac, windows, linux Introduced: 1.0 Security:

# Syntax

the commandKey

# Examples

put commandKey() after keyHistory

if the commandKey is down then edit script of me

# Description

Use the commandKey function to check whether the Command key is being pressed.

On Unix and Windows systems, the commandKey function returns the same value as the controlKey function: the two functions are synonyms.

# Tags

ui,

# See

- **constant:** left, up - **message:** commandKeyDown - **function:** controlKey, value, keysDown - **control structure:** function - **glossary:** function, return, Command key