Page 1 of 1

how can I emulate key press event?

Posted: Wed Mar 03, 2010 6:58 am
by jacky mo
I need to send event to some window.

How can I emulate key press event?

I create event by wxKeyEvent(wxEVT_CHAR), but I can't find how to add press key information?

Posted: Wed Mar 03, 2010 12:18 pm
by okurtsev
wxKeyEvent::m_keyCode
it is public.

http://docs.wxwidgets.org/2.6/wx_keycodes.html - here are all possible key codes, except ASCII characters

Posted: Mon Mar 08, 2010 7:57 am
by jacky mo
okurtsev wrote:wxKeyEvent::m_keyCode
it is public.

http://docs.wxwidgets.org/2.6/wx_keycodes.html - here are all possible key codes, except ASCII characters

It's obsoleted now.

Posted: Mon Mar 08, 2010 8:36 am
by jfouche
Yes, but looking to the sources, this is the only way. Even in wxWidgets sources, they use the member directly.