If you know the different areas you are localizing for just have the user select his/her language? If he selects German you know he needs y for down left. If selects English you know he needs z for down left.

Then if you really want to be nice give them a way to change the settings. A little screen where they can put in there own characters... maybe on Mars they just like to use , for down left for no obvious reason... you never know.


On Feb 14, 2006, at 5:41 PM, Thomas Tempelmann wrote:

On 2/14/06, Eric Baumgartner <[EMAIL PROTECTED]> wrote:
The goal is that I can write code where I can find out what chacter
code both a shiftted and a unshifted press of a specific key gives me
so that I can (a) tell if they're different and then (b) put those
chars codes into me menu as shortcuts by code.

When are you checking? On keydown events, or in a timer? There are
different techniques depending on what you want to do.

Huh? Did you perhaps misunderstand me?

I do not want to check at all. I want to tell the user to press a certain key of which I know the location (and scan code). To be able to tell him which
key I mean, I have to know what's the character that's printed on his
keyboard. That's what I need the mapping for.

And that's quite a common need for games, for instance. In a game, you
might want to offer a 8-direction set of keys for 2-dimensional movement.
E.g, consider you want to use the (english) keys:

  q w e
  a  .  d
  z x c

Now, consider you want to tell the user to press the "z" key for "down left".

But what if the user has a German keyboard? Then you'd have to tell him to press the "y" key instead. And to figure that out, you need a way to map
scan codes to character codes of the local keyboard.

Thomas
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to