08-17-2013, 11:55 AM
i want to handle keys to remap action on specific application.
So for instance, I want to override F1 to do special action instead of launching help , but F2 does the normal action.
Function generic_hook_Proc
Function TraiteTouches
I don't know what code to put next in the TraiteTouches function so that for chosen keys, it does not pass action to CallNextHookEx
and for key not monitored, it does.
So for instance, I want to override F1 to do special action instead of launching help , but F2 does the normal action.
Function generic_hook_Proc
function# nCode message KBDLLHOOKSTRUCT&k
if(nCode<0) goto gNext
if(!(k.flags&LLKHF_UP)) goto gNext ;;Si key down, on passe
int time=k.time
int code=k.vkCode
TraiteTouches(win time code)
;gNext
ret CallNextHookEx(0 nCode message &k)Function TraiteTouches
function int'hwnd int'time int'code
_i=0
_s.getwinexe(hwnd)
str jj
str chacun g
str monitor="qm[]firefox"
foreach chacun monitor
,if(findrx(_s chacun 0 1 g)!=-1)
,,_i+1
,,break
if(_i=0) retI don't know what code to put next in the TraiteTouches function so that for chosen keys, it does not pass action to CallNextHookEx
and for key not monitored, it does.
