From: Kenichi Handa Date: Mon, 24 Oct 2005 08:05:36 +0000 (+0000) Subject: (handle_one_xevent): Handle keysyms directly mapped to X-Git-Tag: emacs-pretest-22.0.90~6348 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3d930b17852823b8c81c713ca7de77c15f95c4b1;p=emacs.git (handle_one_xevent): Handle keysyms directly mapped to supported Unicode characters. --- diff --git a/src/xterm.c b/src/xterm.c index a82cd8c8c97..25283480c02 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -6236,6 +6236,27 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) goto done_keysym; } + /* Keysyms directly mapped to supported Unicode characters. */ + if ((keysym >= 0x01000100 && keysym <= 0x010033ff) + || (keysym >= 0x0100e000 && keysym <= 0x0100ffff)) + { + int code, charset_id, c1, c2; + + if (keysym < 0x01002500) + charset_id = charset_mule_unicode_0100_24ff, + code = (keysym & 0xFFFF) - 0x100; + else if (keysym < 0x0100e000) + charset_id = charset_mule_unicode_2500_33ff, + code = (keysym & 0xFFFF) - 0x2500; + else + charset_id = charset_mule_unicode_e000_ffff, + code = (keysym & 0xFFFF) - 0xe000; + c1 = (code / 96) + 32, c2 = (code % 96) + 32; + inev.ie.kind = MULTIBYTE_CHAR_KEYSTROKE_EVENT; + inev.ie.code = MAKE_CHAR (charset_id, c1, c2); + goto done_keysym; + } + /* Now non-ASCII. */ if (HASH_TABLE_P (Vx_keysym_table) && (NATNUMP (c = Fgethash (make_number (keysym),