GetDefaultKey

Gets the default definition for a key.

Syntax

KBDTools_API HRESULT GetDefaultKey(
BYTE plane,
BYTE page,
BYTE usage,
BYTE* keyType,
BYTE* keyAttribute,
BYTE* keyModifier,
BYTE* value
);

Parameters

plane
Indicates the plane (Normal, Orange, or Green) whose key definition is being referenced.

page
Page value needed to uniquely identify the key.

usage
Usage value needed to uniquely identify the key.

keyType
Determines the primary function for the key:

keyAttribute
Modifies operation of the key:

keyModifier
Controls the "stickiness" of the key and the LED use. May be:

value
Actual value of the key. Depends on keyType and keyAttribute values.

Return Values

S_OK
The function succeeded.

Other
The function failed. Use the Microsoft errlook.exe utility to determine the meaning of this value.

Remarks

For the keyAttribute parameter, use NoAttrib, or 0 or more of any other value can be OR'ed together to form a value. Not all combinations are allowed for each of keyType.

For keyModifier, use NoModifier, or 0 or 1 of StickyOnce, StickyPersist, or StickyLock can be OR'ed with 0 or more of LED1, LED2, or LED3 to form a value.

On return, if all parameters except plane, page, and usage are 0, it usually means there was no previous definition for that key to be returned, or it may mean that the key was defined with all other fields 0.

More Information

KBDTools Functions