mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-15 03:59:15 +08:00
19 lines
466 B
C#
19 lines
466 B
C#
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;
|
|
}
|
|
}
|
|
}
|