public MultiKeyGlobalHotkeyService() { logger = NLog.LogManager.GetCurrentClassLogger(); modifierKeys = new HashSet <string>() { Keys.Control.ToString(), Keys.LControlKey.ToString(), Keys.RControlKey.ToString(), Keys.LWin.ToString(), Keys.RWin.ToString(), Keys.Alt.ToString(), Keys.LMenu.ToString(), Keys.RMenu.ToString(), Keys.RShiftKey.ToString(), Keys.LShiftKey.ToString(), }; keyboardHook = new GlobalKeyboardHook(); hotkeyPressedStates = new Dictionary <string, bool>(); quickCastHotkeys = new Dictionary <string, Action>(); onReleaseHotkeys = new Dictionary <string, Action>(); pressedKeys = new List <string>(); pressedNonModifierKeys = new HashSet <string>(); Start(); }
public SimpleGlobalHotkeyService() { //logger = NLog.LogManager.GetCurrentClassLogger(); pressedKeysInfo = PressedKeysInfo.Empty; keyboardHook = new GlobalKeyboardHook(); hotkeyPressedStates = new Dictionary <PressedKeysInfo, bool>(); quickCastHotkeys = new Dictionary <PressedKeysInfo, Action>(); onReleaseHotkeys = new Dictionary <PressedKeysInfo, Action>(); Start(); }