A function identified as deprecated has been superseded and may become unsupported in the future.
Obtains the keyboard layout for the layout currently selected in the Keyboards menu. (Deprecated in Mac OS X v10.5.)
OSStatus KLGetCurrentKeyboardLayout ( KeyboardLayoutRef *oKeyboardLayout );
On output, a pointer to the keyboard layout reference for keyboard layout currently selected in the Keyboard menu.
A result code.
Keyboards.h
Obtains the keyboard layout reference associated with the specified index. (Deprecated in Mac OS X v10.5.)
OSStatus KLGetKeyboardLayoutAtIndex ( CFIndex iIndex, KeyboardLayoutRef *oKeyboardLayout );
The index of the keyboard layout whose keyboard layout reference you want to retrieve. The index must be a value from 0 through N-1, where N is the value returned in the oCount
parameter by the function KLGetKeyboardLayoutCount
.
On output, a pointer to the keyboard layout reference associated with the index specified by the iIndex
parameter.
A result code.
You can call this function from within an iteration to access all of the available keyboard layouts.
Keyboards.h
Returns the number of keyboard layouts. (Deprecated in Mac OS X v10.5.)
OSStatus KLGetKeyboardLayoutCount ( CFIndex *oCount );
On output, a pointer to a variable that specifies the number of keyboard layouts.
A result code.
You can call the function KLGetKeyboardLayoutCount
when you want to obtain the number of keyboard layouts available to the user. Once you know the number of keyboard layouts, you can iterate through them by setting up a loop and calling the function KLGetKeyboardLayoutAtIndex
.
Keyboards.h
Obtains the value associated with the specified property tag for a keyboard layout. (Deprecated in Mac OS X v10.5.)
OSStatus KLGetKeyboardLayoutProperty ( KeyboardLayoutRef iKeyboardLayout, KeyboardLayoutPropertyTag iPropertyTag, const void **oValue );
A keyboard layout reference for the keyboard layout whose property value you want to retrieve. You must pass a valid keyboard layout reference. You can obtain a keyboard layout reference by calling the functions KLGetKeyboardLayoutAtIndex
, KLGetKeyboardLayoutWithIdentifier
, KLGetKeyboardLayoutWithName
,or KLGetCurrentKeyboardLayout
.
A keyboard layout property tag that specifies the property whose value you want to retrieve. See “Keyboard Layout Property Tag” for a list of the property tag constants you can supply.
On output, a pointer to the variable associated with the tag specified by the iPropertyTag
parameter.
A result code.
You can use this function to obtain keyboard layout data, the keyboard identifier, the icon used for the keyboard menu, the keyboard layout name (including its localized name), the group identifier, and the keyboard layout kind. See “Keyboard Layout Property Tag” for a complete list of the available property tags.
Keyboards.h
Obtains the keyboard layout reference associated with the specified identifier. (Deprecated in Mac OS X v10.5.)
OSStatus KLGetKeyboardLayoutWithIdentifier ( KeyboardLayoutIdentifier iIdentifier, KeyboardLayoutRef *oKeyboardLayout );
The keyboard layout identifier for which you want to obtain a keyboard layout reference. See “Keyboard Layout Identifier” for a list of the constants you can supply.
On output, a pointer to the keyboard layout reference associated with the identifier specified by the iIdentifer
parameter.
A result code.
Keyboards.h
Obtains the keyboard layout associated with the specified name. (Deprecated in Mac OS X v10.5.)
OSStatus KLGetKeyboardLayoutWithName ( CFStringRef iName, KeyboardLayoutRef *oKeyboardLayout );
A CFStringRef
that specifies the name of the keyboard layout whose keyboard layout reference you want to obtain. This name is the nonlocalized keyboard layout name.
On output, a pointer to the keyboard layout reference associated with the name specified by the iName
parameter.
A result code.
You can call this function when you want to obtain the keyboard layout reference for a keyboard layout other than the active keyboard layout. If you want to obtain the keyboard layout reference for the active keyboard layout, call the function KLGetCurrentKeyboardLayout
.
Keyboards.h
Sets the keyboard layout. (Deprecated in Mac OS X v10.5.)
OSStatus KLSetCurrentKeyboardLayout ( KeyboardLayoutRef iKeyboardLayout );
A keyboard layout reference for the keyboard layout you want to set. You must pass a valid keyboard layout reference. You can obtain a keyboard layout reference by calling the functions KLGetKeyboardLayoutAtIndex
, KLGetKeyboardLayoutWithIdentifier
, KLGetKeyboardLayoutWithName
,or KLGetCurrentKeyboardLayout
.
A result code.
Keyboards.h
© 2002 Apple Computer, Inc. All Rights Reserved. (Last updated: 2002-11-18)