| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Nov 26, 2003, at 6:15 AM, Florent Pillet wrote:--
I have created a custom keyboard layout for my TouchStream keyboard with Azerty layout. What I did was copy the French KCHR resource to a new resource file, give it a separate resource ID (1112) and a new name, customized it with ResEdit then installed it in ~/Library/Keyboard Layouts/, cleaned the intl data caches, delogged/relogged then activated it.
While it works fine with most applications I found a carbon terminal app which is doing this:
long KCHRID = ::GetScriptVariable(smCurrentScript, smScriptKeys);
Handle KCHRHdl = ::GetResource('KCHR', KCHRID);
Then it uses the resource to call KeyTranslate().
I talked with the developer and it appears that the application is getting the correct KCHR resource ID but the GetResource call returns NULL.
The only solution I found so far is to copy/paste my KCHR resource into the application's resource file, but I think this may be a bug in Carbon.
I encountered this problem with my AutoPairs utility. The solution is not to use GetResource (on Jaguar and later), but rather something like this:
KeyboardLayoutRef layout = NULL;
OSStatus err = ::KLGetKeyboardLayoutWithIdentifier( kchrNum, &layout );
if (err == noErr)
{
err = ::KLGetKeyboardLayoutProperty( layout, kKLKCHRData, &kchrTable );
}
--
<http://www.jwwalker.com/>
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.
| References: | |
| >Problem with custom KCHR resource (From: Florent Pillet <email@hidden>) | |
| >Re: Problem with custom KCHR resource (From: "James W. Walker" <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.