Revision: 9181 https://osdn.net/projects/ttssh2/scm/svn/commits/9181 Author: zmatsuo Date: 2021-02-23 01:00:55 +0900 (Tue, 23 Feb 2021) Log Message: ----------- altを押しながらのキー入力ができなかったので修正 - r9152 からの不具合 Revision Links: -------------- https://osdn.net/projects/ttssh2/scm/svn/commits/9152 Modified Paths: -------------- trunk/teraterm/teraterm/vtwin.cpp -------------- next part -------------- Modified: trunk/teraterm/teraterm/vtwin.cpp =================================================================== --- trunk/teraterm/teraterm/vtwin.cpp 2021-02-21 03:33:33 UTC (rev 9180) +++ trunk/teraterm/teraterm/vtwin.cpp 2021-02-22 16:00:55 UTC (rev 9181) @@ -2562,16 +2562,28 @@ if (MetaKey(ts.MetaKey)) { if (!KeybEnabled || (TalkStatus != IdTalkKeyb)) return; + char Code = nChar; wchar_t u16; - if (ts.Meta8Bit != IdMeta8BitRaw) { - const char mb_str[2] = {(char)nChar | 0x80, 0}; - unsigned int u32; - size_t mb_len = MBCPToUTF32(mb_str, 1, CP_ACP, &u32); - if (mb_len == 0) { - return; + switch (ts.Meta8Bit) { + case IdMeta8BitRaw: + Code = nChar; + break; + default: + if (IsWindowUnicode(HVTWin) == TRUE) { + u16 = nChar; } - u16 = (wchar_t)u32; + else { + if (ts.Meta8Bit != IdMeta8BitRaw) { + const char mb_str[2] = {(char)nChar, 0}; + unsigned int u32; + size_t mb_len = MBCPToUTF32(mb_str, 1, CP_ACP, &u32); + if (mb_len == 0) { + return; + } + u16 = (wchar_t)u32; + } + } } for (unsigned int i = 1; i <= nRepCnt; i++) { switch (ts.Meta8Bit) { @@ -2583,7 +2595,7 @@ } break; case IdMeta8BitText: - Code |= 0x80; + u16 |= 0x80; CommTextOutW(&cv, &u16, 1); if (ts.LocalEcho) { CommTextEchoW(&cv, &u16, 1);