Print out current text when ignoring dead keys

This commit is contained in:
Kovid Goyal 2019-02-14 14:56:06 +05:30
parent 5726466db3
commit 3b25081353
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -232,7 +232,7 @@ static int translateFlags(NSUInteger flags)
char *p = buf; char *p = buf;
if (!src[0]) return "<none>"; if (!src[0]) return "<none>";
while (*src) { 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; if (p != buf) *(--p) = 0;
return buf; return buf;
@ -856,7 +856,7 @@ - (void)keyDown:(NSEvent *)event
} }
if (window->ns.deadKeyState && (char_count == 0 || scancode == 0x75)) { if (window->ns.deadKeyState && (char_count == 0 || scancode == 0x75)) {
// 0x75 is the delete key which needs to be ignored during a compose sequence // 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; return;
} }
} }