How Do I Get Unicode Input From Keyboard?

0 views
Skip to first unread message

Justin Boulder

unread,
Oct 30, 2005, 7:06:06 PM10/30/05
to wx-u...@lists.wxwidgets.org

I am working on an application which displays text in Thai.
I was finally able to figure out (to some extent) how to
display Thai text in a Text Control. I had to do a Unicode
build to get that to work.

I was able to test this by creating some sample text in
Microsoft Word, and saving it in Unicode encoding. In
my application, I open the file, read the encoded text,
and display it correctly in the text control.

Now, the other part of what I need to do is display what
I am typing in Thai. How do I programatically switch
keyboard layouts in wxWidgets? Or is the approach to
get every keypress in the text control and somehow translate
it to Thai then redisplay it? What is the correct way
to do this?

I know that I can change the active keyboard by clicking on
the "EN" in the system tray and selecting "TH"...but is there
another way to do this within a program?

Thanks in advance.


Vadim Zeitlin

unread,
Oct 31, 2005, 2:03:12 PM10/31/05
to wx-u...@lists.wxwidgets.org
On Sun, 30 Oct 2005 17:06:06 -0700 Justin Boulder <justin...@comcast.net> wrote:

JB> How do I programatically switch keyboard layouts in wxWidgets?

Normally you don't, the keyboard layout should be selected by the user.
It can be very unnerving if you switch layout behind his back.

In any case, wx doesn't have any functions to do this, you should look in
MSDN docs to see how to do it under Windows. As for other OS I have no
idea.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/


Reply all
Reply to author
Forward
0 new messages