Re: List of keyboard layouts
Re: List of keyboard layouts
- Subject: Re: List of keyboard layouts
- From: Deborah Goldsmith <email@hidden>
- Date: Thu, 28 Jun 2007 18:11:49 -0700
On Jun 27, 2007, at 3:46 AM, email@hidden wrote:
I'm afraid there is no way to get the set of enabled keyboards in
currently shipping versions of Mac OS X. This is planned to be
addressed in a future version of Mac OS X.
Ok, but where is this info stored?
Apple does not support access to this information in shipping
versions of Mac OS X.
I think you want kKLLocalizedName, not kKLName. However, you
shouldn't always be getting "U.S." Please file a bug.
Sorry, all working fine in one application.
I need to retrieve current keyboard layout from hidden application. In
other words, I need layout, which selected in system menu, near clock.
As I guess, KLGetCurrentKeyboardLayout returns keyboard layout,
selected for my application? How I can retrieve current layout
system-wide?
Here is thread code:
-(void)testLayout:(id)param
{
while(true)
{
KeyboardLayoutRef theCurrentLayout;
NSString *layoutName;
KLGetCurrentKeyboardLayout(&theCurrentLayout);
KLGetKeyboardLayoutProperty( theCurrentLayout, kKLLocalizedName,
(const void **)&layoutName );
NSLog( @"Current layout: %@", layoutName );
sleep( 1 );
}
}
There is only one current keyboard layout accessible at any given
time in currently shipping versions of Mac OS X. If you have "Allow a
different input source for each document" enabled in International
Preferences, there is no way to find out which input source is
selected for other documents.
Deborah Goldsmith
Internationalization, Unicode liaison
Apple Inc.
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden