本文介绍了以编程方式触发快捷键即使对于Direct X也是如此的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我正在使用输入管理器DDL文件以编程方式触发命令,例如(因为我希望我的命令适用于DirectX以及我使用的是InputManager)

1. WindowKey

2. WindowKey + D

3. WindowKey + E

4. ALT + CTRL + DEL

5. WindowKey + C

6.窗口+。

但是我无法使用快捷键解雇它们

Hi I am using Input Manager DDL file to fire command programmatically such as( Since I want my Command to work for DirectX as well I am using InputManager )
1. WindowKey
2. WindowKey +D
3. WindowKey +E
4. ALT+CTRL+DEL
5. WindowKey + C
6. Window + .
But I could not fire them using shortcut key

Keys[] keys = new Keys[] { Keys.LWin, Keys.D };
InputManager.Keyboard.ShortcutKeys(keys); 




or by

private void BtnFireCmd_Click(object sender, EventArgs e)
        {
           // ExampleText.Focus(); //Sets focus on the example textbox

            Thread.Sleep(2000);
           // InputManager.Keyboard.KeyDown(Keys.Alt);
            InputManager.Keyboard.KeyDown(Keys.LWin);
            Thread.Sleep(2000);
            InputManager.Keyboard.KeyDown(Keys.C);

            Thread.Sleep(5000);
             InputManager.Keyboard.KeyUp(Keys.LWin);
            InputManager.Keyboard.KeyUp(Keys.Alt);


        }



我能否得到任何线索。





即使是窗口键也没有被触发它正在按下但没有触发。



谢谢


Could I get any clue for that.
InputManager library - Track user input and simulate input (mouse and keyboard)

Even Window Key is not Firing It is getting press but not firing.

Thank You

推荐答案


这篇关于以编程方式触发快捷键即使对于Direct X也是如此的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-21 10:17