pcb

Comment 3 for bug 700742

Revision history for this message
Peter Clifton (pcjc2) wrote : Re: hid/gtk: Remove keynames translation-table

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);