currently I am using AutoHotkey to intercept a computer standby and instead do my own action (Alt+F4 keypress). I am doing this because HID of the Gyration Remote's dongle doesn't send any keypress when the power button is pressed on the remote, instead it just invokes a power event.
For full reference, here is the AHK script I am using:
- Code: Select all
;Autohotkey script "Set standby button to ALT+F4"
;=================================================================================
OnMessage(0x218, "WM_POWERBROADCAST")
WM_POWERBROADCAST(wParam, lParam)
{
If wParam=0
{
Send, !{F4}
Return 0x424D5144
}
Else Return
}
I was just wondering, is there a way to do this in EG only? I can see the "System.QuerySuspend" and "System.QuerySuspendFailed" events after the button keypress in the EG's event log. The most important part in AHK script however seems to be the "Return 0x424D5144" (otherwise the power event is not stopped) and I have no idea how to do this in EG.
