I wonder if we can make GDK do the leg work of conversion... (UNTESTED)
Could you investigate whether the following would help us?
key_char = "|"; // For example
gunichar unichar = g_utf8_get_char (key_char); // For best robustness, use g_utf8_get_char_validated() above and handle in-band error returns (gunichar)-1 and (gunichar)-2 unsigned int keyval = gdk_unicode_to_keyval (unicode_point); const char *keyval_name = gdk_keyval_name (keyval);
I wonder if we can make GDK do the leg work of conversion... (UNTESTED)
Could you investigate whether the following would help us?
key_char = "|"; // For example
gunichar unichar = g_utf8_get_char (key_char); get_char_ validated( ) above and handle in-band error returns (gunichar)-1 and (gunichar)-2 to_keyval (unicode_point);
// For best robustness, use g_utf8_
unsigned int keyval = gdk_unicode_
const char *keyval_name = gdk_keyval_name (keyval);