Lingo Dictionary > A-C > controlDown |  |

controlDown

Syntax

    the controlDown

Description

Function; determines whether the Control key is being pressed (`TRUE`) or not (`FALSE`).

You can use the `controlDown` function together with `the key` to check for combinations of the Control key and another key.

For a movie playing back with the Director player for Java, this function returns `TRUE` only if a second key is pressed simultaneously with the Control key. If the Control key is pressed by itself, `controlDown` returns `FALSE`. The Director player for Java supports key combinations with the Control key. However, the browser receives the keys before the movie and thus responds to and intercepts any key combinations that are also browser keyboard shortcuts.

For a demonstration of modifier keys and Lingo, see the sample movie Keyboard Lingo in Director Help.

Example

This `on keyDown` handler checks whether the pressed key is the Control key, and if it is, the handler activates the `on doControlKey` handler. The argument `(the key)` identifies which key was pressed in addition to the Control key.

    on keyDown
    	if (the controlDown)then doControlKey (the key)
    end

See also

`charToNum()`, `commandDown`, `key()`, `keyCode()`, `optionDown`, `shiftDown`