BoringHeroes.Interaction.KeyboardHook.RegisterHotKey C# (CSharp) Method

RegisterHotKey() private method

private RegisterHotKey ( IntPtr hWnd, int id, uint fsModifiers, uint vk ) : bool
hWnd System.IntPtr
id int
fsModifiers uint
vk uint
return bool
        private static extern bool RegisterHotKey(IntPtr hWnd, int id, uint fsModifiers, uint vk);

Same methods

KeyboardHook::RegisterHotKey ( ModifierKeys modifier, Keys key ) : void

Usage Example

 public MainWindow()
 {
     var main = new MainRoutine(null);
     TreeDebug td = new TreeDebug();
     td.AnalyzeComposite(main.Root, null);
     td.ShowDialog();
     InitializeComponent();
     Instance = this;
     keyboardHook = new KeyboardHook();
     keyboardHook.RegisterHotKey(0, Keys.F1);
     keyboardHook.KeyPressed += KeyboardHook_KeyPressed;
     IsPaused = false;
     var myTimer = new Timer();
     myTimer.Elapsed += DisplayTimeEvent;
     myTimer.Interval = 1000; // 1000 ms is one second
     myTimer.Start();
     ControlInput.SetupHeroesWindow();
 }