Re: Shortcut handling in different keyboard layouts
Re: Shortcut handling in different keyboard layouts
- Subject: Re: Shortcut handling in different keyboard layouts
- From: "Rimas M." <email@hidden>
- Date: Tue, 31 Mar 2009 12:39:49 +0300
On Tue, Mar 31, 2009 at 3:21 AM, Eric Schlegel <email@hidden> wrote:
>
> You probably want this: [[theEvent characters] characterAtIndex:0].
>
> -eric
The code above returns unichar - symbol (!) code 0-65535. While
keyboard layout is US for example, pressing "P" (lowercase, without
shift or any other modifiers) gives code 112 (ASCII lowercase 'p',
ASCII and Unicode 0-255 matches). Meanwhile after switching keyboard
layout to RU (Cyrillic), pressing the same key produces symbol "ะท" (I
am sure on www this symbol will not be displayed) with unichar code
1079. And that is the problem - what I need to do to ensure that
pressing "p" in US and "RU" keyboard layouts will do the same action
in my app.
Regards,
RImas M.
_______________________________________________
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