From 424a6762f7934549d509eb654b7d883f773be402 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Thu, 14 Jul 2016 13:59:50 +0200 Subject: [PATCH] Support for numeric keyboard with Ins+nnnn added --- ZRCola/zrcolakeyhndlr.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ZRCola/zrcolakeyhndlr.cpp b/ZRCola/zrcolakeyhndlr.cpp index 97f9560..184a369 100644 --- a/ZRCola/zrcolakeyhndlr.cpp +++ b/ZRCola/zrcolakeyhndlr.cpp @@ -44,6 +44,11 @@ bool wxZRColaKeyHandler::ProcessEvent(wxEvent& event) pFrame->SetStatusText(_("INS key is pressed. Type the Unicode code of desired character now (up to four hexadecimal digits: 0-9, A-F), then release INS.")); } else if (m_is_insert) { wxChar chr = e.GetUnicodeKey(); + if (!chr) { + int key = e.GetKeyCode(); + if (WXK_NUMPAD0 <= key && key <= WXK_NUMPAD9) + chr = '0' + (key - WXK_NUMPAD0); + } wxFrame *pFrame = wxDynamicCast(((ZRColaApp*)wxTheApp)->m_mainWnd, wxFrame); if (('0' <= chr && chr <= '9' || 'A' <= chr && chr <= 'F') && m_insert_seq.size() < 4) { // A hex-digit pressed. Save it.