Handling shortcuts and accelerators in a real world situation

by Michael S. Kaplan, published on 2005/02/02 02:20 -05:00, original URI: http://blogs.msdn.com/b/michkap/archive/2005/02/02/365237.aspx


Not too long ago (well, I have not been doing this very long!) I talked about shortcuts and accelerators. Let's take that information 'round the dancefloor for a bit....

Mark T. posted in the newsgroups recently:

lets assume that we are speaking about a game where the supposed 'Z' key triggers an action.

I would like to know if this is appropriate for instance for people using Arabic, Hebrew, Hindi, Russian or Thai keyboard.

I think that there is no ‘Z’ printed in any key of those keyboards.

Would it be convenient for those users to click the ‘Z’ key to do something?

If not, what would you suggest for a situation where there are not many trigger keys while all Windows supported scripts are used?

I had seen that Chinese versions of Windows use ASCII for menu shortcuts. Also found that Thai applications use Thai shortcuts, maybe because it is more convenient.

The supposition is correct -- there will often be no "Z" printed on the keyboard; users will not know what to type. So it definitely will not qualify as convenient. :-)

Generally speaking, they would need to have instructions that told them what keys to press for their language. While you could localize the instructions into target languages, the best worldwide solution would be to build this into the game on a help screen that used the ToUnicode() API to find out what character was indeed on the specific keys (this is a suitable method even if the user changes their layout, since if they know how to type on their current keyboard, they know where the letters would be, even if it is not what is printed on the keys).

Thinking about the Chinese and Thai examples for a second -- in Chinese, the keyboard is usually a US keyboard (most of the IMEs use the US keyboard as a base), which is why accelerators and shortcuts both tend to look that way (well, that and the fact that an ideograph takes multiple keystrokes and both shortcuts and accelerators need just one). For Thai the same rules do not apply and the Thai keyboard layout will have other keys there, thus for Thai using the Thai language for the instructions makes sense. That ToUnicode() based solution I mentioned may still be the best world-wide solution to the problem, and a small additional investment now will definitely save money later as you expand into more markets....

 

This post brought to you by "ﭮ" (U+fb6e, a.k.a. ARABIC LETTER PEHEH ISOLATED FORM)


# Centaur on 2 Feb 2005 12:05 PM:

Speaking of Russian keyboards, they all come with Latin letters in black and Cyrillic letters in red. (There are monochrome keyboards but they are inconvenient to use.) So one can safely assume that a Russian user will know what key Z is on, and will be able to enter the actual Z character.

On the other hand, I really wish Mozilla Thunderbird could proceed to the next unread message on Т (U+0422, Cyrillic Capital Letter Te) as well as N (U+004E, Latin Capital Letter N).


If one does not have Latin letters on the keyboard, how does one go about entering shell commands or Internet addresses?

# Michael Kaplan on 2 Feb 2005 12:21 PM:

Well, that is where it gets sticky. You have to switch layouts and then know where the letters are. :-(

go to newer or older post, or back to index or month or day