inputsimulator
inputsimulator copied to clipboard
Emulating keypress chord doesn't work if user has other keys depressed
trafficstars
Suppose I have an app or plugin that binds a HotKey sequence, such as Shift+Alt+M to an app feature. That feature then attempts to invoke a Paste operation by calling KeyboardSimulator.ModifiedKeyStroke(VirtualKeyCode.CONTROL, VirtualKeyCode.VK_V)
The Ctrl+V is not sent while Shift or Alt is pressed because now it looks like Shift+Alt+Ctrl+V
I've tried un-pressing pressed modifier keys with KeyUp but that doesn't work either.
I can't tell the user "make sure you lift off the keyboard quickly!"
Any advice would be greatly appreciated.