/// <summary> /// mwgSendKey の AltKeyAction を指定出来る版です。 /// key は Keys.Alt を含んでいると想定します。 /// </summary> /// <param name="key"></param> /// <param name="action"></param> /// <returns></returns> private bool mwgSendAltKey(Keys key, AltKeyAction action) { if (action == AltKeyAction.Meta && (key & Mods.MetaE) != 0) { key = key & ~Mods.MetaE | Mods.Meta; } byte[] data; int len = GetTerminal().EncodeInputKey2(key, out data); if (len > 0) { mwgSendBytes(data, len); return(true); } else { return(false); } }
private void ProcessSpecialAltKey(AltKeyAction act, Keys modifiers, Keys body) { if (!this.EnabledEx) return; char ch = KeyboardInfo.Scan(body, (modifiers & Keys.Shift) != Keys.None); if (ch == '\0') return; //���蓖�Ă��Ă��Ȃ���͖��� if ((modifiers & Keys.Control) != Keys.None) ch = (char)((int)ch % 32); //Control��������琧�䕶�� if (act == AltKeyAction.ESC) { byte[] t = new byte[2]; t[0] = 0x1B; t[1] = (byte)ch; //Debug.WriteLine("ESC " + (int)ch); SendBytes(t); } else { //Meta ch = (char)(0x80 + ch); byte[] t = new byte[1]; t[0] = (byte)ch; //Debug.WriteLine("META " + (int)ch); SendBytes(t); } }