Nuget添加引用

Install-Package FMUtils.KeyboardHook

调用示例:

var KeyboardHook = new Hook("Global Action Hook");
KeyboardHook.KeyDownEvent += KeyDown;
// Also: KeyboardHook.KeyUpEvent += KeyUp;

private void KeyDown(KeyboardHookEventArgs e)
{
    // handle keydown event here
    // Such as by checking if e (KeyboardHookEventArgs) matches the key you're interested in
    
    if (e.Key == Keys.F12 && e.isCtrlPressed)
    {
        // Do your magic...
    }
}

 

相关文章:

  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2021-08-29
猜你喜欢
  • 2022-01-30
  • 2021-06-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案