Language Reference
Documentation

Language

Objects
Internet Objects

Keyboard Class

Has Constructor: NO, Can Create Instance: NO
Can Subclass: NO

Use the keyboard object to information about keys pressed and status of control key.

Methods

AsyncKeyDown
Syntax: Keyboard.AsyncKeyDown(keycode as integer) as Integer

Returns 1 (true) if the key with the keycode is pressed, 0 (false) if not.

Keyname
Syntax: Keyboard.Keyname(keycode as Integer) as string

Returns the name of the key with the given keycode.

Properties

AsyncCommandKey
Data Type: Integer

Returns 1 (true) if the command key is pressed.

AsyncControlKey
Data Type: Integer

Returns 1 (true) if the command key is pressed.

AsyncOptionKey
Data Type: Integer

Returns 1 (true) if the command key is pressed.

AsyncShiftKey
Data Type: Integer

Returns 1 (true) if the command key is pressed.

ControlKey
Data Type: Integer

Returns 1 (true) if the Control key was depressed at the start of the event.

OptionKey
Data Type: Integer

Returns 1 (true) if the Option key was depressed at the start of the event.

ShiftKey
Data Type: Integer

Returns 1 (true) if the shift key was depressed at the start of the event.

CommandKey
Data Type: Integer

Returns 1 (true) if the command key was depressed at the start of the event.

Sample Code


//Checks for the command key
if keyboard.CommandKey == true then
    msgbox("Hello Command Key pressed")
end if