Edit: made it working that way:
EnergencyStop.ahk
j::
; use "`" to esacpe percent sign!
; you may need to apply this script to your firewall rules to work correctly because there's an outgoing connection
Run,curl.exe
"
http://YOURREPETIERHOST:3344/printer/api/myPrinter?apikey=APIKEY?a=send&data=`%7B`%22cmd`%22`%3A`%22M112`%22`%7D"
--max-time 1
MsgBox, Triggered emergency stop! Please wait
15 seconds until Duet 2 recovered
return
Please have also look at the screenshot because in this repetier forum the upper posted code will not be displayed correctly. The URL re-renders "data=%7B
%22cmd%22
%3A%22M112
%22`%7D"
That will trigger M112 command when pressing CTRL + J on your client computer. You will need to compile it with AutoHotKey (super easy task).
To compile a usable EnergencyStop.exe just download curl.exe for Windows and AutoHotKey.
https://www.autohotkey.com/download (i used the portable zip file)
https://curl.haxx.se/windows<div>Please note that curl.exe and curl-ca-bundle.crt needs to be in the same folder where EnergencyStop.exe is compiled. Otherwise the script won't call it correctly
</div>
Starting the executable will put it minimized to taskbar icons next to date/clock. Then it listens to hotkey input
Note: just a quick starting point. You can do a lot more stuff with this