Can you try setting System.useCodepage = true and see if that changes which values you get?

 


From: [email protected] [mailto:[email protected]]
Sent: Thursday, April 28, 2005 11:34 AM
To: [email protected]
Subject: [flexcoders] KeyDown Event returns incorrect ascii values

 


KeyDown Event returns incorrect ascii values when used with a spanish
layout keyboard.

I followed the calculator tutorial
<http://www.macromedia.com/devnet/flex/articles/calculator.html>
and tried to extend it to accept keyboard input.
I noticed that the ascii values are returned, according to the
documentation, based on an us english layout keyboard.

It works as documented, but not as I expected.  I think that function is
completely useless for people with a non-us keyboard,
and keyboard layout cannot be assumed, as we are developing applications
for the internet.

Well, when I tried to get the ascii codes, I was not able to get the
correct codes.
For example, when i press Shift + 2, I get an at "@" sign , instead of a
quote sign, as if I had an english keyboard.
I mean, that is very cool when writing games when I need to get full
control of the shift, control, etc, but when I was trying to
get regular keyboard input for a simple calculator, i was not able to
enter the equal sign by pressing
Shift + 0, as I would do in any application using my normal spanish
keyboard, to enter the "=", but I get the ")" instead.

Can anyone tell me what am i doing wrong, or tell me the rationale
behind this design?

I'm attaching my modified calculator in case someone wants to review it.1

Thanks in advance,

    Daniel Montero
    [EMAIL PROTECTED]






Yahoo! Groups Links

Reply via email to