Fix generation of key events for non-alphabetic keys under Windows.
Don't hardcode the values of VK_OEM_XXX keys which are completely nonsensical on keyboards with non-US layouts. Use the real unshifted value of the key as its key code instead -- at least if it's a Latin-1 character. Otherwise, use WXK_NONE as the key code and pass the character generated by the key as Unicode character code. Also generate WXK_NONE events for dead keys to avoid confusing them with the corresponding normal key events. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2342,6 +2342,14 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
||||
eventType = wxEVT_COMMAND_LIST_KEY_DOWN;
|
||||
|
||||
event.m_code = wxMSWKeyboard::VKToWX(wVKey);
|
||||
|
||||
if ( event.m_code == WXK_NONE )
|
||||
{
|
||||
// We can't translate this to a standard key code,
|
||||
// until support for Unicode key codes is added to
|
||||
// wxListEvent we just ignore them.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
event.m_itemIndex =
|
||||
|
Reference in New Issue
Block a user