Perhaps the macosx maintainer can help me on this? Before I start
debugging code myself.
Go ahead and dig into it and let us know what you find. I don’t think
anyone working on Mac OS X has international input set up.
Ok, I dug into it, and I found a mermaid, and… no, not the right
story.
So, I found out that you need to process the event into NSText to
have correct key composition.
It is now working correctly with this patch:
1.2.11 (patched on website distrib)
SDL_QuartzEvents.m
around line 255, add 4 lines
static void QZ_DoKey (_THIS, int state, NSEvent *event) {
NSString *chars;
unsigned int numChars;
SDL_keysym key;
if(state == SDL_PRESSED) {
NSText *fieldEditor = [qz_window fieldEditor:YES
forObject:nil];
[fieldEditor interpretKeyEvents:[NSArray
arrayWithObject:event]];
}
I would appreciate comments from cocoa programmer out here, I’m not
experienced enough with cocoa to know if this is the right thing to
do (but, again, it is working). I read the doc and the NSText is only
instanced once, overhead should be minimal.
Calling [event characters] after NSText interpreted the event will
result in a correct composed character. Only the keyDown
(SDL_PRESSED) event should be processed, because the keyUp event
would reset the composition.
I looked at the source for 1.3, and I think the same patch can be
applied (at least, the same technique), except for the window
(qz_window), as 1.3 has multiple windows support.
Best regardsOn 13 Jun 2007, at 8:49 AM, Sam Lantinga wrote:
–
Kuon
"Don’t press that button."
http://goyman.com/