Link Search Menu Expand Document

SSpread.GetActionKey Method

Explanation Gets the shortcut key associated with a particular action.

Use the SetActionKey method if you want to associate a shortcut key with a particular action.
Call format GetActionKey(action)
Return value Record object with the following child objects
Type Name Description
Number Shift Shift key state ( $TRUE or $FALSE )
Number Ctrl [ Ctrl ] key state ( $TRUE or $FALSE )
Number Key The key associated with a particular action
Arguments action Actions for which you want to find out the shortcut key
Specify the following values.
Type Name Description
Number Shift Shift key state ( $TRUE or $FALSE )
Number Ctrl [ Ctrl ] key state ( $TRUE or $FALSE )
Number Key The key associated with a particular action
Exception EXT-1 The argument of GetActionKey is invalid.
EXT-28 An error occurred in the GetActionKey method
Example of use
    var ret = GetActionKey($ActionKeyClear);
    var keyDesc = "";
    if (ret.Shift == $TRUE) {
        keyDesc += "Shift + ";
    }
    if (ret.Ctrl == $TRUE) {
        keyDesc += "Ctrl + ";
    }
    keyDesc += "Virtual key code:" + str(ret.Key);
    MessageBox("Data erasure of active cell is associated with " + keyDesc);
    
Related item SetActionKey method