gunichar *cb;
ptrdiff_t i;
glong len;
+ gunichar uc;
FOR_EACH_FRAME (tail, tem)
{
|| IsKeypadKey (keysym) /* 0xff80 <= x < 0xffbe */
|| IsFunctionKey (keysym) /* 0xffbe <= x < 0xffe1 */
/* Any "vendor-specific" key is ok. */
- || (keysym & (1 << 28))
- || (keysym != GDK_KEY_VoidSymbol && !event->key.string))
+ || (keysym & (1 << 28)))
&& !(event->key.is_modifier))
{
inev.ie.kind = NON_ASCII_KEYSTROKE_EVENT;
inev.ie.kind = NO_EVENT;
}
+ else
+ {
+ uc = gdk_keyval_to_unicode (keysym);
+
+ if (uc)
+ {
+ inev.ie.kind = (SINGLE_BYTE_CHAR_P (uc)
+ ? ASCII_KEYSTROKE_EVENT
+ : MULTIBYTE_CHAR_KEYSTROKE_EVENT);
+ inev.ie.code = uc;
+ }
+ else
+ {
+ inev.ie.kind = NON_ASCII_KEYSTROKE_EVENT;
+ inev.ie.code = keysym;
+ }
+ }
done:
if (inev.ie.kind != NO_EVENT)
goto XI_OTHER;
#endif
-#ifdef HAVE_X_I18N
XKeyPressedEvent xkey;
memset (&xkey, 0, sizeof xkey);
xkey.keycode = xev->detail;
xkey.same_screen = True;
+#ifdef HAVE_X_I18N
#ifdef USE_GTK
if ((!x_gtk_use_native_input
&& x_filter_event (dpyinfo, (XEvent *) &xkey))