4D v16.3

OBJECT GET SHORTCUT

Home

 
4D v16.3
OBJECT GET SHORTCUT

OBJECT GET SHORTCUT 


 

OBJECT GET SHORTCUT ( {* ;} object ; key ; modifiers ) 
Parameter Type   Description
Operator in If specified, object is an object name (string)
If omitted, object is a variable
object  Form object in Object Name (if * is specified) or
Variable (if * is omitted)
key  String in Key associated with object
modifiers  Longint in Modifier key mask or combination of masks

The OBJECT GET SHORTCUT command returns the keyboard shortcut associated with the object(s) designated by the object and * parameters for the current process.

If you pass the optional * parameter, this indicates that the object parameter is an object name (a string). If you do not pass this parameter, this indicates that the object is a variable. In this case, you pass a variable reference instead of a string.

The key parameter returns the character associated with the key (in the case of a standard key) or a string enclosed in brackets designating the key (in the case of a function key). You can compare this value with the constants of the Shortcut and Associated Keys theme (see the OBJECT SET SHORTCUT command).

The modifiers parameter returns a value indicating the modifier key(s) associated with the shortcut. If there are several modifier keys combined, the command returns the sum of their values. You can compare the value returned with the following constants of the Events (Modifiers) theme:

Constant Type Value Comment
Command key mask Longint 256 Ctrl key under Windows, Command key under OS X
Control key mask Longint 4096 Ctrl key under OS X, or right click under Windows and OS X
Option key mask Longint 2048 Alt key (also called Option under OS X)
Shift key mask Longint 512 Windows and OS X

If there are no modifier keys for the shortcut, modifiers returns 0.

Note: If the object parameter designates several objects in the form that have different settings, the command returns "" in key and 0 in modifiers.



See also 

OBJECT SET SHORTCUT

 
PROPERTIES 

Product: 4D
Theme: Objects (Forms)
Number: 1186

 
HISTORY 

Created: 4D v13

 
TAGS 

Raccourci clavier

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)