> Matching on keycode will almost always confuse your users.
>
> There are at least 9 different Cyrillic keyboard layouts supported by OS X.
> If you write code that matches the virtual keycode for 2nd rank 11th key, it
> will match "з" (ze) for half or those layouts and "п" (pe) for the other
> ha
Matching on keycode will almost always confuse your users.
There are at least 9 different Cyrillic keyboard layouts supported by
OS X. If you write code that matches the virtual keycode for 2nd rank
11th key, it will match "з" (ze) for half or those layouts and
"п" (pe) for the other half.
> In that case, you'd want to use the virtual keycode - available as [event
> keyCode] - rather than the character code. I thought when you'd posted your
> original question, though, you said that you wanted your keyboard event
> matching to be dependent on the keyboard layout, so that if you used,
On Mar 31, 2009, at 2:39 AM, Rimas M. wrote:
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 s
On Tue, Mar 31, 2009 at 3:21 AM, Eric Schlegel 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)
> In general, using character codes is the most appropriate way. It lets the
> matching code automatically adapt to whatever the current keyboard layout
> may be. If you check the character code, it doesn't matter which physical
> key you've pressed.
Just to be sure - what character codes you are
> In general, using character codes is the most appropriate way. It lets the
> matching code automatically adapt to whatever the current keyboard layout
> may be. If you check the character code, it doesn't matter which physical
> key you've pressed.
Sounds interesting. I am gonna try this right n
On Mar 26, 2009, at 10:16 AM, Rimas M. wrote:
Take iTunes as example. With US layout enabled, pressing Cmd+Y calls
Preferences. Meanwhile to do the same in German layout you need to
press also Cmd+Y, but "Y" button is not the same as in US and produces
different code.
In this particular case,
On Thu, Mar 26, 2009 at 1:16 PM, Rimas M. wrote:
> I have a question about how properly keyboard shortcuts should be
> handled. For example "pressing key X performs action W". How to ensure
> that this will work with all keyboard layouts (Cyrillic etc)?
I believe the ShortcutRecorder project o