From 3b25081353358072f2513c0d3db888dda2979d56 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 14 Feb 2019 14:56:06 +0530 Subject: [PATCH] Print out current text when ignoring dead keys --- glfw/cocoa_window.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index d854aa29d..fc6b65057 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -232,7 +232,7 @@ format_text(const char *src) { char *p = buf; if (!src[0]) return ""; while (*src) { - p += snprintf(p, sizeof(buf) - (p - buf), "%x ", (unsigned char)*(src++)); + p += snprintf(p, sizeof(buf) - (p - buf), "0x%x ", (unsigned char)*(src++)); } if (p != buf) *(--p) = 0; return buf; @@ -856,7 +856,7 @@ is_ascii_control_char(char x) { } if (window->ns.deadKeyState && (char_count == 0 || scancode == 0x75)) { // 0x75 is the delete key which needs to be ignored during a compose sequence - debug_key(@"Ignoring dead key.\n"); + debug_key(@"Ignoring dead key (text: %s).\n", format_text(_glfw.ns.text)); return; } }