We help IT Professionals succeed at work.

detecting input method (keyboard language)

SnowFlake
SnowFlake asked
on
How do I detect the currently selected input method either from ActionScript (Preffered) or from Javascript ?
i.e. - I want to know what does it say on the user's language bar - what keyboard is he using.

for those wandering why, ther reason is that I am trying to find a workaround for a bug in the combination of firefox/flash where when using wmode=transparent on the flash object the keyboard input to the flash seems to ignore the language settings (e.g. in german keyboard AltGr+Q does not produce the expected @ but shift 2 does).
Comment
Watch Question

Top Expert 2008
Commented:
you could use flash.system.Capabilities and flash.system.IME to try to determine the input language.
flash.system.Capabilities.language gives you a string representing system language code:

Czech cs
Danish da
Dutch nl
English en
Finnish fi
French fr
German de
Hungarian hu
Italian it
Japanese ja
Korean ko
Norwegian no
Other/unknown xu
Polish pl
Portuguese pt
Russian ru
Simplified Chinese zh-CN
Spanish es
Swedish sv
Traditional Chinese zh-TW
Turkish tr
Other than that I don't think you can have access to what keyboard layout users has chosen.

Commented:
If I remember correctly, that specific bug has nothing to do with the language...  That happens no matter what language you have selected as long as you are using the wmode=transparent...

CyanBlue

Author

Commented:
you are absoluely right.
I am hopeing that if there is a way to know the language from JS then maybe my flash can check it out and do some fixes based on specific keycodes it gets.
I am not looking to solve the entier bug - even though that would have been nice - just to allow people with different keybaords add @.

SnowFlake
Commented:
Simplest thing people normally do is to add a virtual keyboard where you can click to type...  But I don't really know if there is any work-around for this specific problem since it is due to the bug in the wmode and how the web browser is handing this...  :(

CyanBlue

Author

Commented:
yes, I am getting the feeling that what I asked for here just does not exist.
I will probably have to give up the wmode.
Commented:
If you ask me, wmode == bad...  :(

CyanBlue

Author

Commented:
nope, actually in this case its firefox=bad ...

Author

Commented:
thank you both for your inputs, most of the points went to julianopolito for actual information given.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.