From 185d0094f891202d7de486ad5a295a8fe88b84a7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 11 Nov 2001 20:39:28 +0000 Subject: [PATCH] fixed key event code for ASCII keys in wxListCtrl git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/listctrl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index c527a6f0d3..f16980f75f 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -1694,7 +1694,11 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) else { eventType = wxEVT_COMMAND_LIST_KEY_DOWN; - event.m_code = wxCharCodeMSWToWX(wVKey); + + // wxCharCodeMSWToWX() returns 0 if the key is an ASCII + // value which should be used as is + int code = wxCharCodeMSWToWX(wVKey); + event.m_code = code ? code : wVKey; } event.m_itemIndex =