Quick Macros Forum
Hotkeys doesnt work - Printable Version

+- Quick Macros Forum (http://www.quickmacros.com/forum)
+-- Forum: Development (http://www.quickmacros.com/forum/forumdisplay.php?fid=6)
+--- Forum: Bug Reports (http://www.quickmacros.com/forum/forumdisplay.php?fid=18)
+--- Thread: Hotkeys doesnt work (/showthread.php?tid=6347)



Hotkeys doesnt work - Leeroll - 01-06-2018

I dont know why but I have tried everything. Making sure hotkeys/triggers is enabled, making sure the triggerkey on the macro is correct and is stated so on the macro but everytime I press the trigger, nothing happens. However if I click RUN, the macro works. 

Would really appreciate some help with this!!!


RE: Hotkeys doesnt work - Gintaras - 01-07-2018

Some possible reasons, and how to fix or debug it:

Restart Quick Macros. Sometimes Windows disables a low-level hook because of timeout. These hooks are used for triggers.

In Options/Triggers, in the first list must be selected Keyboard. By default all are selected.

In Options/Trigger, Use low-level hook, try to uncheck Keyboard. Then Apply and test triggers. Check again if it does not help.

Run this macro to test whether low-level keyboard hooks work.

Function LL_keyboard_hooks
Code:
int hh=SetWindowsHookEx(WH_KEYBOARD_LL &sub.LLKeyboardProc _hinst 0)
mes "Press several keys while this message box is open. It should display key names in QM output."
UnhookWindowsHookEx hh


#sub LLKeyboardProc
function nCode wParam KBDLLHOOKSTRUCT&h

FormatKeyString h.vkCode 0 &_s
out "%s %s%s" _s iif(h.flags&LLKHF_UP "up" "down") iif(h.flags&LLKHF_INJECTED ", injected" "")

ret CallNextHookEx(0 nCode wParam &h)

Also test mouse triggers.