Key - DfComUIObject

Augmented to implement the GUI keyboard interface

Type: Event

Return Data Type: Integer

Parameters: Integer iKeyValue

ParameterDescription
iKeyValueThe key value


Return Value

Returns a Key value


Syntax
Procedure Key Integer iKeyValue Returns Integer

Description

The Key message is augmented to implement the GUI keyboard interface.

You can augment this message to intercept keystrokes by the user and act on them.
You can also overwrite or intercept this message to disallow keyboard input or to ignore certain keyboard input.

Sample

This sample overwrites this message to disallow all keyboard input in the current object or class.

Procedure Key Integer iKeyVal
End_Procedure


Sample

This sample augments this message to disallow all keyboard of digits 0-9 in the current object or class.

Procedure Key Integer iKeyVal
    // 48 = '0', 57 = '9'
    If ((iKeyVal<48) OR (iKeyVal>57)) Begin
        Forward Send Key IKeyVal
    End
End_Procedure

See Also

KeyAction | Accelerator Keys