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 protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
