mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-10 13:35:31 +02:00
Add autohotkey
This commit is contained in:
18
Wox.Infrastructure/Hotkey/AHKHotkey.cs
Normal file
18
Wox.Infrastructure/Hotkey/AHKHotkey.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using AutoHotkey.Interop;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Wox.Infrastructure.Hotkey
|
||||
{
|
||||
public class AHKHotkey : IHotkey
|
||||
{
|
||||
public bool RegisterHotkey(string hotkey, Action action)
|
||||
{
|
||||
AutoHotkeyEngine ahk = AHKHotkeyEngineFactory.CreateOrGet("default");
|
||||
ahk.ExecRaw(string.Format("{0}::MsgBox, ssss!",hotkey));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user