aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--termkey.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/termkey.c b/termkey.c
index 81b5133..881122e 100644
--- a/termkey.c
+++ b/termkey.c
@@ -1001,6 +1001,8 @@ size_t termkey_strfkey(TermKey *tk, char *buffer, size_t len, TermKeyKey *key, T
switch(key->type) {
case TERMKEY_TYPE_UNICODE:
+ if(!key->utf8[0]) // In case of user-supplied key structures
+ fill_utf8(key);
l = snprintf(buffer + pos, len - pos, "%s", key->utf8);
break;
case TERMKEY_TYPE_KEYSYM: