示例#1
0
文件: Form1.cs 项目: Vas1123/bot
        private void Form1_Load(object sender, EventArgs e) // Not in use
        {
            GlobalKeyboardHook globalKeyboardHook = new GlobalKeyboardHook();

            globalKeyboardHook.HookedKeys.Add(Keys.A);
            globalKeyboardHook.HookedKeys.Add(Keys.F11);
            globalKeyboardHook.KeyUp += new KeyEventHandler(Gkh_KeyUp);
        }
示例#2
0
        private void Form2_Load(object sender, EventArgs e)
        {
            GlobalKeyboardHook gkh = new GlobalKeyboardHook();

            gkh.HookedKeys.Add(Keys.A);
            gkh.HookedKeys.Add(Keys.B);
            gkh.KeyUp += new KeyEventHandler(Gkh_KeyUp);
        }