KeyNamingCopyOneKeyName
Get a name for a key.
KeyNamingCopyKeyNames
Get names for a list of keys.
KeyNamingCopyKeyNamesAsArray
Get names for a list of keys, as a CFArray.
KeyNamingCopyOneKeyNameHID
Get a name for a key.
KeyNamingCopyKeyNamesHID
Get names for a list of keys.
KeyNamingCopyKeyNamesAsArrayHID
Get names for a list of keys, as a CFArray.
KeyNamingSetStringTable
Specifies the string table to use for naming special keys.
KeyNamingSetStringTableAndBundle
Specifies the string table to use for naming special keys.

KeyNamingCopyOneKeyName


Get a name for a key.

CFStringRef KeyNamingCopyOneKeyName(
    uint16_t inVirtualKeyCode);  
Parameters
inVirtualKeyCode
The virtual key code of the key to name.
Return Value

A name string for the key. You are responsible for releasing this string.

Discussion

Given a virtual key code, returns a description as a CFStringRef. This will either be the character generated by the corresponding key in the current keyboard layout (for instance, A) or a string loaded from the current string table (for instance, Caps Lock or ).

Only avaliable if KEYNAMING_ENABLE_VKC is non-zero.


KeyNamingCopyKeyNames


Get names for a list of keys.

CFStringRef KeyNamingCopyKeyNames(
    uint32_t inCount,
    const uint16_t *const inVirtualKeyCodes);  
Parameters
inCount
The number of keys.
inVirtualKeyCodes
The virtual key codes of the keys to name, in an array.
Return Value

A name string for the keys. You are responsible for releasing this string.

Discussion

Given an array of virtual key codes, return a string containing descriptions of the keys. Key names will be separated by two spaces. (This is potentially useful for combinations, such as Shift  Option  A.) Marginally more efficient than multiple calls to KeyNamingCopyOneKeyName() in that certain internal state can be cached.

Only avaliable if KEYNAMING_ENABLE_VKC is non-zero.


KeyNamingCopyKeyNamesAsArray


Get names for a list of keys, as a CFArray.

CFArrayRef KeyNamingCopyKeyNamesAsArray(
    uint32_t inCount,
    const uint16_t *const inVirtualKeyCodes);  
Parameters
inCount
The number of keys.
inVirtualKeyCodes
The virtual key codes of the keys to name, in an array.
Return Value

A list of name strings for the keys. You are responsible for releasing this array.

Discussion

Given an array of virtual key codes, return a list containing a description of each of the keys. Marginally more efficient than multiple calls to KeyNamingCopyOneKeyName() in that certain internal state can be cached.

Only avaliable if KEYNAMING_ENABLE_VKC is non-zero.


KeyNamingCopyOneKeyNameHID


Get a name for a key.

CFStringRef KeyNamingCopyOneKeyNameHID(
    int32_t inUsage);  
Parameters
inUsage
The HID usage code of the key to name.
Return Value

A name string for the key. You are responsible for releasing this string.

Discussion

Given a HID usage code in the Keyboard or Keypad page, returns a description as a CFStringRef. This will either be the character generated by the corresponding key in the current keyboard layout (for instance, A) or a string loaded from the current string table (for instance, Caps Lock or ).

Only avaliable if KEYNAMING_ENABLE_HID is non-zero.


KeyNamingCopyKeyNamesHID


Get names for a list of keys.

CFStringRef KeyNamingCopyKeyNamesHID(
    uint32_t inCount,
    const int32_t *const inUsages);  
Parameters
inCount
The number of keys.
inUsages
The HID usage codes of the keys to name, in an array.
Return Value

A name string for the keys. You are responsible for releasing this string.

Discussion

Given an array of HID usage codes, return a string containing descriptions of the keys. Key names will be separated by two spaces. (This is potentially useful for combinations, such as Shift  Option  A.) Marginally more efficient than multiple calls to KeyNamingCopyOneKeyNameHID() in that certain internal state can be cached.

Only avaliable if KEYNAMING_ENABLE_HID is non-zero.


KeyNamingCopyKeyNamesAsArrayHID


Get names for a list of keys, as a CFArray.

CFArrayRef KeyNamingCopyKeyNamesAsArrayHID(
    uint32_t inCount,
    const int32_t *const inUsages);  
Parameters
inCount
The number of keys.
inUsages
The HID usage codes of the keys to name, in an array.
Return Value

A list of name strings for the keys. You are responsible for releasing this array.

Discussion

Given an array of HID usage codes, return a list containing a description of each of the keys. Marginally more efficient than multiple calls to KeyNamingCopyOneKeyNameHID() in that certain internal state can be cached.

Only avaliable if KEYNAMING_ENABLE_VKC is non-zero.


KeyNamingSetStringTable


Specifies the string table to use for naming special keys.

void KeyNamingSetStringTable(
    CFStringRef inTableName);  
Parameters
inTableName
The name of the string table to use.
Discussion

Call to identify the property list/.strings file KeyNaming should use for special key names. The default is KeyNaming. Passing NULL will revert to default.


KeyNamingSetStringTableAndBundle


Specifies the string table to use for naming special keys.

void KeyNamingSetStringTableAndBundle(
    CFStringRef inTableName,
    CFBundleRef inBundle);  
Parameters
inTableName
The name of the string table to use.
inBundle
The bundle to look in.
Discussion

Call to identify the property list/.strings file KeyNaming should use for special key names, and the bundle in which to look for the file. The defaults are KeyNaming and NULL, which will cause the main bundle to be used. Passing NULL will revert to default.

© 2001–2008 Jens Ayton Last Updated: 2008-10-22