Navigation:  Classes > bKeyCommand >

bKeyCommand:Init()

Print this Topic    Previous pageReturn to chapter overviewNext page

Purpose

Creates an object of the class bKeyCommand.

Class

bKeyCommand

Type

Method

Syntax

bKeyCommand{

<bKey | cKey>,

<lAlt>,

<lCtrl>,

<lShift>,

<lExt>,

<oOwner>,

<symCommand>,

[<auArgument>]

} Æ oKeyCommand

Arguments

<bKey>The virtual key code of the key that must be pressed.
Data Type:Byte

 

<cKey>The key as string that must be pressed.
Data Type:String

 

<lAlt>A logical value that indicates whether additionally also the key ALT must be pressed.
Data Type:Logic

 

<lCtrl>A logical value that indicates whether additionally also the key CTRL must be pressed.
Data Type:Logic

 

<lShift>A logical value that indicates whether additionally also the key SHIFT must be pressed.
Data Type:Logic

 

<lExt>A logical value that indicates whether the key code refers to the numeric key block.
Data Type:Logic

 

<oOwner>An object in which the method is to be called, if the key code is pressed.
Data Type:Object

 

<symCommand>The name of the method that is to be called in <oOwner>, if the key code is pressed.
Data Type:Symbol

 

<auArguments>An array with the arguments that are to be passed to the method <symCommand>.
Data Type:Array

Return Value

oKeyCommandThe created object of the class bKeyCommand.
Data Type:bKeyCommand

Description

bKeyCommand:Init() creates a new object of the class bKeyCommand and initializes it.

Samples

The following sample defines a keyboard command that is executed if the key combination Ctrl + Delete is pressed. In this case the method Delete() is called to which as parameter a server is passed to:

 

oKeyCommand := bKeyCommand{KEYDELETE,;         // key code

                                                 ,;              // Alt key

                                                 TRUE,;          // Ctrl key

                                                 ,;              // Shift key

                                                 ,;              // Number block

                                                 oWindow,;       // Owner

                                                 #Delete,;       // Name of the method

                                                 {odbsServer}}   // Argument list

 

The following sample defines a keyboard command that is executed if the key combination Alt + d is pressed. In this case the method Delete() is called to which as parameter a server is passed to:

 

oKeyCommand := bKeyCommand{"d",;               // key code

                                                 TRUE,;          // Alt key

                                                 ,;              // Ctrl key

                                                 ,;              // Shift key

                                                 ,;              // Number block

                                                 oWindow,;       // Owner

                                                 #Delete,;       // Name of the method

                                                 {odbsServer}}   // Argument list

See Also

bKeyCommand:ArgumentList

bKeyCommand:Command

bKeyCommand:Owner

 


Page url: http://www.YOURSERVER.com/index.html?bkeycommand_init.htm