Hi,
I need to create a custom wxTextCtrl class and so I am inheriting wxTextCtrl class in my custom class.
In order to understand a few things I have added a wxLogMessage to the text sample's OnKeyDown handler and I have noticed that under Linux it never gets called if I type an accented character such as á, é, ã, etc. On Windows and Mac OS it does get called but NOT on Linux.
Text sample's text.cpp code with the added wxLogMessage call:
void MyTextCtrl::OnKeyDown(wxKeyEvent& event)
{
if ( ms_logKey )
LogKeyEvent( "Key down", event);
=====>>>> wxLogMessage("OnKeyDown. event.GetKeyCode() = %d", event.GetKeyCode()); <<== Never gets called for accented chars on Linux, but does get called on Windows and Mac OS.
event.Skip();
...
I am using Linux Ubuntu 18.04.
Does anyone have any clues on this issue?
Thanks in advance.
EVT_KEY_DOWN event NOT triggered on Linux for accented chars
- doublemax@work
- Super wx Problem Solver
- Posts: 474
- Joined: Wed Jul 29, 2020 6:06 pm
- Location: NRW, Germany
Re: EVT_KEY_DOWN event NOT triggered on Linux for accented chars
wxWidgets version?
Can you build and run the "keyboard" sample that comes with wxWidgets and check if it does the same?
Can you build and run the "keyboard" sample that comes with wxWidgets and check if it does the same?
Re: EVT_KEY_DOWN event NOT triggered on Linux for accented chars
Did you check it is not XIM related:
http://wxwidgets.org/docs/faq/gtk/#xim
http://wxwidgets.org/docs/faq/gtk/#xim
Re: EVT_KEY_DOWN event NOT triggered on Linux for accented chars
I will try to do this and get back here to post the results!doublemax@work wrote: ↑Tue Jul 06, 2021 2:19 pm wxWidgets version?
Can you build and run the "keyboard" sample that comes with wxWidgets and check if it does the same?
Thanks
Re: EVT_KEY_DOWN event NOT triggered on Linux for accented chars
I will check this out.PB wrote: ↑Tue Jul 06, 2021 3:59 pm Did you check it is not XIM related:
http://wxwidgets.org/docs/faq/gtk/#xim
Thanks