From 8799d263350b3c6552b7f21c82c1301ae1c9299e Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Thu, 3 Sep 2020 13:33:59 -0400 Subject: [PATCH] Mac: avoid assertion violations from KeyboardCapture.cpp... (#658) ... when the NSEvent is not accessible --- src/KeyboardCapture.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/KeyboardCapture.cpp b/src/KeyboardCapture.cpp index 2cec8bfd0..836f2c9a8 100644 --- a/src/KeyboardCapture.cpp +++ b/src/KeyboardCapture.cpp @@ -341,8 +341,9 @@ private: // as in the combo box case of bug 1252. We can't compute it! // This makes a difference only when there is a capture handler. // It's never the case yet that there is one. - wxASSERT(false); - return chars; + + // Return just a one-character string. + return event.GetUnicodeKey(); } NSString *c = [mEvent charactersIgnoringModifiers];