2417 doupdate(); |
2417 doupdate(); |
2418 } |
2418 } |
2419 |
2419 |
2420 static int bindcommand(keycode kcode) |
2420 static int bindcommand(keycode kcode) |
2421 { |
2421 { |
2422 gchar asciikey[16]; |
2422 gchar asciikey[16], asciicode[16]; |
2423 const gchar *boundcmd; |
2423 const gchar *boundcmd; |
2424 |
2424 |
|
2425 if (kcode.utf8) |
|
2426 g_snprintf(asciicode, 15, "U%d", kcode.value); |
|
2427 else |
|
2428 g_snprintf(asciicode, 15, "%d", kcode.value); |
|
2429 |
2425 if (!kcode.mcode || kcode.mcode == MKEY_EQUIV) |
2430 if (!kcode.mcode || kcode.mcode == MKEY_EQUIV) |
2426 g_snprintf(asciikey, 15, "%d", kcode.value); |
2431 g_snprintf(asciikey, 15, "%s", asciicode); |
2427 else if (kcode.mcode == MKEY_META) |
2432 else if (kcode.mcode == MKEY_META) |
2428 g_snprintf(asciikey, 15, "M%d", kcode.value); |
2433 g_snprintf(asciikey, 15, "M%s", asciicode); |
2429 else |
2434 else |
2430 g_snprintf(asciikey, 15, "MK%d", kcode.mcode); |
2435 g_snprintf(asciikey, 15, "MK%s", asciicode); |
2431 |
2436 |
2432 boundcmd = settings_get(SETTINGS_TYPE_BINDING, asciikey); |
2437 boundcmd = settings_get(SETTINGS_TYPE_BINDING, asciikey); |
2433 |
2438 |
2434 if (boundcmd) { |
2439 if (boundcmd) { |
2435 gchar *cmd, *boundcmd_locale; |
2440 gchar *cmd, *boundcmd_locale; |