• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Shortcut handling in different keyboard layouts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shortcut handling in different keyboard layouts


  • Subject: Re: Shortcut handling in different keyboard layouts
  • From: "Rimas M." <email@hidden>
  • Date: Wed, 1 Apr 2009 11:11:16 +0300

> 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, for
> example, a Dvorak keyboard layout, where the 'p' key is generated from the
> physical key that has an 'r' on it in the US layout, you'd still detect and
> match against that physical key. That's why I suggested using the character
> code rather than the keycode.
>
> -eric

You are right. If I would choose "keyCode way", there will be problems
with layouts like Dvorak.
I have an idea: Check if input character has code 0-255 (ASCII). If
yes - perform matching by symbol or its code. Otherwise (Unicode
symbol, like Cyrillic) perform matching by keyCode. I am wondering if
it will work in right way...

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

  • Follow-Ups:
    • Re: Shortcut handling in different keyboard layouts
      • From: Peter Castine <email@hidden>
  • Prev by Date: Bindings and MenuItems
  • Next by Date: Persistent store removal throwing invalidated NSManagedObject exceptions
  • Previous by thread: Re: Bindings and MenuItems
  • Next by thread: Re: Shortcut handling in different keyboard layouts
  • Index(es):
    • Date
    • Thread