Bug #18474 2012-01-07 07:29

hquan

Sometimes wxScintilla::OnChar fails to accept key

My wxWidget version is 2.8.12-1. Version in SVN is 7663M. I found that wxScintilla::OnChar fails to accept alphanumeric key just after another non-alphanumeric is press. I checked the code and find that when the non-alphanumeric key is process in OnKeyDown, m_lastKeyDownConsumed will be set to be true. In the next turn when a alphanumeric key comes, OnKeyDown will not be called but go directly to OnChar. Thus m_lastKeyDownConsumed will be true in this turn and since the key is not unicode, this key will not be processed by calling DoAddChar. Temporarily I set m_lastKeyDownConsumed=false before judging m_lastKeyDownConsumed and skip. It seems to be working now. I don't understand the purpose of m_lastKeyDownConsumed and it seems not to be necessary. Or maybe somewhere another version of OnKeyDown is called.

Category
Application::Editor
Group
Platform:Linux
Status
Closed
Close date
2012-02-20 01:30
Assigned to
 
ollydbg 2012-02-13 02:00

QUOTE: "My wxWidget version is 2.8.12-1. Version in SVN is 7663M. I found that wxScintilla::OnChar fails to accept alphanumeric key just after another non-alphanumeric is press."

I do not have such problem here, wx2.8.12 and C::B trunk latest.

Can you give a step by step instruction to reproduce this?

I have tried:

1, press <TAB> key

2, press a alphanumberic key like "a"

3, "a" is shown in the editor. So, it works OK!

Everything works FINE. and I check the value : In function void wxScintilla::OnChar (wxKeyEvent& evt), m_lastKeyDownConsumed is false when I hit the "a".

ollydbg 2012-02-13 02:01

Oh, forget to say that I works under Windows XP, so your problem may related to Linux....

hquan 2012-02-14 06:53

I rechecked it today and find all key will go through OnKeyDown, so there maybe something wrong with the old wxGTK. I updated system recently and maybe this is the reason.

Hi admin, can you please close this bug and patch 003248? Thanks

ollydbg 2012-02-20 01:30

Ok, I close this bug report.