altを押しながらのキー入力ができなかったので修正
- r9152 からの不具合
@@ -2562,16 +2562,28 @@ | ||
2562 | 2562 | if (MetaKey(ts.MetaKey)) { |
2563 | 2563 | if (!KeybEnabled || (TalkStatus != IdTalkKeyb)) |
2564 | 2564 | return; |
2565 | + | |
2565 | 2566 | char Code = nChar; |
2566 | 2567 | wchar_t u16; |
2567 | - if (ts.Meta8Bit != IdMeta8BitRaw) { | |
2568 | - const char mb_str[2] = {(char)nChar | 0x80, 0}; | |
2569 | - unsigned int u32; | |
2570 | - size_t mb_len = MBCPToUTF32(mb_str, 1, CP_ACP, &u32); | |
2571 | - if (mb_len == 0) { | |
2572 | - return; | |
2568 | + switch (ts.Meta8Bit) { | |
2569 | + case IdMeta8BitRaw: | |
2570 | + Code = nChar; | |
2571 | + break; | |
2572 | + default: | |
2573 | + if (IsWindowUnicode(HVTWin) == TRUE) { | |
2574 | + u16 = nChar; | |
2573 | 2575 | } |
2574 | - u16 = (wchar_t)u32; | |
2576 | + else { | |
2577 | + if (ts.Meta8Bit != IdMeta8BitRaw) { | |
2578 | + const char mb_str[2] = {(char)nChar, 0}; | |
2579 | + unsigned int u32; | |
2580 | + size_t mb_len = MBCPToUTF32(mb_str, 1, CP_ACP, &u32); | |
2581 | + if (mb_len == 0) { | |
2582 | + return; | |
2583 | + } | |
2584 | + u16 = (wchar_t)u32; | |
2585 | + } | |
2586 | + } | |
2575 | 2587 | } |
2576 | 2588 | for (unsigned int i = 1; i <= nRepCnt; i++) { |
2577 | 2589 | switch (ts.Meta8Bit) { |
@@ -2583,7 +2595,7 @@ | ||
2583 | 2595 | } |
2584 | 2596 | break; |
2585 | 2597 | case IdMeta8BitText: |
2586 | - Code |= 0x80; | |
2598 | + u16 |= 0x80; | |
2587 | 2599 | CommTextOutW(&cv, &u16, 1); |
2588 | 2600 | if (ts.LocalEcho) { |
2589 | 2601 | CommTextEchoW(&cv, &u16, 1); |