# HG changeset patch # User Mikael Berthe # Date 1155148121 -7200 # Node ID 17ef145f3326cd4b3b3bc087195c1f48a88b13e9 # Parent aec71ebf98fa1bf6839ad0be8ca9c4b8326e2e71 Display and use UTF-8 key codes UTF-8 key codes can be used for key bindings, for example /bind MU224 = ... will bind "Meta-a`". diff -r aec71ebf98fa -r 17ef145f3326 mcabber/src/screen.c --- a/mcabber/src/screen.c Wed Aug 09 20:26:06 2006 +0200 +++ b/mcabber/src/screen.c Wed Aug 09 20:28:41 2006 +0200 @@ -2419,15 +2419,20 @@ static int bindcommand(keycode kcode) { - gchar asciikey[16]; + gchar asciikey[16], asciicode[16]; const gchar *boundcmd; + if (kcode.utf8) + g_snprintf(asciicode, 15, "U%d", kcode.value); + else + g_snprintf(asciicode, 15, "%d", kcode.value); + if (!kcode.mcode || kcode.mcode == MKEY_EQUIV) - g_snprintf(asciikey, 15, "%d", kcode.value); + g_snprintf(asciikey, 15, "%s", asciicode); else if (kcode.mcode == MKEY_META) - g_snprintf(asciikey, 15, "M%d", kcode.value); + g_snprintf(asciikey, 15, "M%s", asciicode); else - g_snprintf(asciikey, 15, "MK%d", kcode.mcode); + g_snprintf(asciikey, 15, "MK%s", asciicode); boundcmd = settings_get(SETTINGS_TYPE_BINDING, asciikey);