コード例 #1
0
        // public override void Release()
        // {
        //	base.Release();
        // }

        public override void SendKeyImpl(int iVKey, bool?bExtKey, bool?bDown)
        {
            SiCode si = SiCodes.Get(iVKey, bExtKey);

            if (si == null)
            {
                char ch = SiCodes.VKeyToChar(iVKey);
                if (ch != char.MinValue)
                {
                    SendCharImpl(ch, bDown);
                }
                return;
            }

            string strXKeySym = si.XKeySym;

            if (string.IsNullOrEmpty(strXKeySym))
            {
                Debug.Assert(false); return;
            }

            string strVerb = "key";

            if (bDown.HasValue)
            {
                strVerb = (bDown.Value ? "keydown" : "keyup");
            }

            RunXDoTool(strVerb, strXKeySym);
        }
コード例 #2
0
ファイル: SiEngineUnix.cs プロジェクト: Gallimathias/KeePass
        public override void SendCharImpl(char ch, bool?obDown)
        {
            string strVerb = "key";

            if (obDown.HasValue)
            {
                strVerb = (obDown.Value ? "keydown" : "keyup");
            }

            RunXDoTool(strVerb, SiCodes.CharToXKeySym(ch));
        }