HotKey Interface Reference

A HotKey controls enables the user specify an keyboard shortcut. More...

Inheritance diagram for HotKey:

Inheritance graph
Collaboration diagram for HotKey:

Collaboration graph
List of all members.

Properties

VARIANT RW Key []
 Gets or sets the keyboard shortcut.
LONG RW InvalidKeys []
 Specifies the invalid key combination.
VARIANT RW DefaultKey []
 Gets or sets the keyboard shortcut that used then the user enters invalid key combination (see InvalidKeys).

Detailed Description

A HotKey controls enables the user specify an keyboard shortcut.

When the user changes selection, the OnChange event occur.

See also the method CreateHotKey of the Frame.

Example (JScript):

o = new ActiveXObject("Scripting.WindowSystemObject")

o.EnableVisualStyles = true

f = o.CreateForm(0,0,0,0)

f.Text = "WSO"
f.ClientWidth = 400
f.ClientHeight = 100
f.CenterControl()

hotKey = f.CreateHotKey(10,10,200,25)
hotKey.Key = o.Translate("VK_F1 | KB_ALT")
hotKey.OnChange = function(){
        var Key = hotKey.Key
        var S = ""
        var Flags = o.Translate("KB_CTRL | KB_ALT | KB_SHIFT")
        S = Key &~ Flags
        if (Key & o.Translate("KB_CTRL")) S += ", Ctrl"
        if (Key & o.Translate("KB_ALT")) S += ", Alt"
        if (Key & o.Translate("KB_SHIFT")) S += ", Shift"
        f.Text = Key + " (" + S +")"
}

f.Show()

o.Run()


Property Documentation

VARIANT RW DefaultKey

Gets or sets the keyboard shortcut that used then the user enters invalid key combination (see InvalidKeys).

LONG RW InvalidKeys

Specifies the invalid key combination.

Default: 0.

Note:
DefaultKey used when the user enters an invalid key combination.

VARIANT RW Key

Gets or sets the keyboard shortcut.


WSO 1.1 Documentation. Date modified:Wed Aug 12 18:12:43 2015. (C) Veretennikov A. B. 2004-2015