ssCore.Keyboard.block

Prevent Flash from seeing the specified key code. If any of the optional shift states are specified, the key will only be blocked if that exact shift key pattern is matched. If any of the optional shift keys are specified, they must all be specified (or an error will be returned).


Availability:

First available in version 3.0 build 2039.


Input Parameters:

key - The virtual key code to block.

alt - [Optional] - When set to 1, the Alt key must be pressed with the key to be blocked. If 0, the key must be unpressed. Valid values include: 0 and 1.

shift - [Optional] - When set to 1, the Shift key must be pressed with the key to be blocked. If 0, the key must be unpressed. Valid values include: 0 and 1.

ctrl - [Optional] - When set to 1, the Ctrl key must be pressed with the key to be blocked. If 0, the key must be unpressed. Valid values include: 0 and 1.


Output Parameters:

No output parameters.


Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.Keyboard.block( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.Keyboard.block( paramsObject );


Notes:

None.


Examples:

The following example blocks the Escape key.

ssCore.Keyboard.block({key:ssKey.VK_ESCAPE, alt:0, shift:0, ctrl:0});