diff --git a/contrib/src/stc/stc.cpp b/contrib/src/stc/stc.cpp index f534906177..ec1f9949d0 100644 --- a/contrib/src/stc/stc.cpp +++ b/contrib/src/stc/stc.cpp @@ -2782,9 +2782,9 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) { // be a function key or etc., the platforms appear to always give us a // small value in this case) then fallback to the ascii key code but // don't do anything for function keys or etc. - if (key <= 255) { + if (key <= 127) { key = evt.GetKeyCode(); - keyOk = (key <= 255); + keyOk = (key <= 127); } if (keyOk) { m_swx->DoAddChar(key); diff --git a/contrib/src/stc/stc.cpp.in b/contrib/src/stc/stc.cpp.in index 9d5b1f19b2..a21f681252 100644 --- a/contrib/src/stc/stc.cpp.in +++ b/contrib/src/stc/stc.cpp.in @@ -550,9 +550,9 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) { // be a function key or etc., the platforms appear to always give us a // small value in this case) then fallback to the ascii key code but // don't do anything for function keys or etc. - if (key <= 255) { + if (key <= 127) { key = evt.GetKeyCode(); - keyOk = (key <= 255); + keyOk = (key <= 127); } if (keyOk) { m_swx->DoAddChar(key); diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index f534906177..ec1f9949d0 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -2782,9 +2782,9 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) { // be a function key or etc., the platforms appear to always give us a // small value in this case) then fallback to the ascii key code but // don't do anything for function keys or etc. - if (key <= 255) { + if (key <= 127) { key = evt.GetKeyCode(); - keyOk = (key <= 255); + keyOk = (key <= 127); } if (keyOk) { m_swx->DoAddChar(key); diff --git a/src/stc/stc.cpp.in b/src/stc/stc.cpp.in index 9d5b1f19b2..a21f681252 100644 --- a/src/stc/stc.cpp.in +++ b/src/stc/stc.cpp.in @@ -550,9 +550,9 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) { // be a function key or etc., the platforms appear to always give us a // small value in this case) then fallback to the ascii key code but // don't do anything for function keys or etc. - if (key <= 255) { + if (key <= 127) { key = evt.GetKeyCode(); - keyOk = (key <= 255); + keyOk = (key <= 127); } if (keyOk) { m_swx->DoAddChar(key);