//1. Define key combinations (we're going to use Ctrl+Q)
var pasteAddress = Combination.FromString("Control+Q");
//2. Define actions
Action actionPasteAddress = PasteAddressInWindow;
//3. Assign actions to key combinations
var assignment = new Dictionary<Combination, Action>
{
{pasteAddress, actionPasteAddress}
};
//4. Install listener
Hook.AppEvents().OnCombination(assignment);
void PasteAddressInWindow()
{
SendKeys.SendWait("Q");
}
So when SendKeys.SendWait("Q"); is called, the software still thinks CONTROL is being held at this point. Im not sure why. This triggers an endless loop.
After I terminate the program, Windows thinks I still have CONTROL held in, so I have to restart my system for it to reset.
from article: https://github.com/gmamaladze/globalmousekeyhook/blob/vNext/keycomb.md
Example:
So when SendKeys.SendWait("Q"); is called, the software still thinks CONTROL is being held at this point. Im not sure why. This triggers an endless loop.
After I terminate the program, Windows thinks I still have CONTROL held in, so I have to restart my system for it to reset.