Re: List of keyboard layouts
Re: List of keyboard layouts
- Subject: Re: List of keyboard layouts
- From: email@hidden
- Date: Wed, 27 Jun 2007 14:46:01 +0400
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?
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 );
}
}
_______________________________________________
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