Re: insertText: without a NSWindow/NSView (or: Unicode input without NSView/Window)
Re: insertText: without a NSWindow/NSView (or: Unicode input without NSView/Window)
- Subject: Re: insertText: without a NSWindow/NSView (or: Unicode input without NSView/Window)
- From: Ken Thomases <email@hidden>
- Date: Wed, 30 Jan 2008 02:21:55 -0600
On Jan 30, 2008, at 2:05 AM, Adam Zegelin wrote:
I can do single keys fine, I just send the [[event characters]
characterAtIndex:0] off to the game engine. But things composite
characters like option-e + e (é) do not work. [[event characters]
characterAtIndex:0] just returns "e". Non-composite keys like option-
w (∑) do work correctly.
Why do you not process all of the characters in the event? In other
words, [[even characters] length] may be greater than 1. There should
be a COMBINING ACUTE ACCENT (u0301) character following the "e".
If the game engine needs precomposed characters, then you can call -
[NSString precomposedStringWithCanonicalMapping] on the string,
first. Note that this is orthogonal to my previous point. It is
_not_ guaranteed to reduce the length to 1.
Also, since I'm only inspecting the event stream, other systems of
input such as the Character Palette don't work with the application.
I don't know the solution to this. However, most input sources other
than the keyboard would be unavailable in full-screen mode, anyway.
Right? So, you should be able to get by with the ordinary NSWindow/
NSView methods.
-Ken
_______________________________________________
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