Use the NuGet version of InputSimulator

This commit is contained in:
Yeechan Lu
2014-01-26 02:13:52 +08:00
parent 71ec4ad403
commit 54819eb367
3 changed files with 287 additions and 281 deletions

View File

@@ -29,7 +29,9 @@ namespace WinAlfred
SelectedRecords selectedRecords = new SelectedRecords();
private KeyboardListener keyboardListener = new KeyboardListener();
private bool WinRStroked = false;
private bool WinRStroked = false;
private WindowsInput.KeyboardSimulator keyboardSimulator = new WindowsInput.KeyboardSimulator(new WindowsInput.InputSimulator());
public MainWindow()
{
@@ -245,7 +247,7 @@ namespace WinAlfred
if (keyevent == KeyEvent.WM_KEYUP && WinRStroked && vkcode == (int)Keys.LWin)
{
WinRStroked = false;
WindowsInput.InputSimulator.SimulateModifiedKeyStroke(WindowsInput.VirtualKeyCode.LWIN, WindowsInput.VirtualKeyCode.CONTROL);
keyboardSimulator.ModifiedKeyStroke(WindowsInput.Native.VirtualKeyCode.LWIN, WindowsInput.Native.VirtualKeyCode.CONTROL);
return false;
}
}