• 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: Peter Castine <email@hidden>
  • Date: Wed, 1 Apr 2009 16:39:04 +0200

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. Your users are not going to count off ranks and keys, they will be looking for a Cyrillic character. Half of them will hit a different key from what you're expecting.

If Cyrillic keyboards are likely to be a part of your user base, you would probably be better advised to set up a mapping table for Cyrillic characters. Either map the Cyrillic alphabet to the Latin alphabet and from thence to your keyboard commands or, better still, map the Cyrillic alphabet directly to the keyboard-triggered commands.

As pointed out earlier, the OS handles this automagically for Cmd-key combinations. You can see this for yourself by turning on a couple of relevant keyboard layouts in System Preferences->International->Input Menu, selecting one of them and turning on the Keyboard Viewer (at the bottom of the Input Menu). While the Command key is depressed, the layout reverts to US Sholes.

I have used a few applications that implemented keyboard shortcuts beyond Command-key combinations. Those that implemented keyboard- command mappings based on an assumed physical location of characters have always left international users confused and disatisfied.

My €0.02 -- Peter



On 1-Apr-2009, at 10:11, Rimas M. wrote:
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...

_______________________________________________

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: "Rimas M." <email@hidden>
References: 
 >Re: Shortcut handling in different keyboard layouts (From: "Rimas M." <email@hidden>)

  • Prev by Date: Re: NSMutableArray is null?
  • Next by Date: Handling List of Hardware Devices in NSTableView w/ Asynchronous Updates
  • Previous by thread: Re: Shortcut handling in different keyboard layouts
  • Next by thread: Re: Shortcut handling in different keyboard layouts
  • Index(es):
    • Date
    • Thread