for some reason InputHook() property OnEnd returns value 0. I don't understand why and/or what does it mean:
- I don't set any end keys (either by character code, either by keycode) but I get one.
- No character code or keycode is equal to 0.
Code: Select all
F_InitiateInputHook()
{
global ;assume-global mode of operation
v_InputH := InputHook("V I1") ;I1 on purpose
, v_InputH.OnChar := Func("F_OneCharPressed")
, v_InputH.OnKeyUp := Func("F_BackspaceProcessing")
, v_InputH.OnEnd := Func("F_InputHookOnEnd")
v_InputH.KeyOpt("{Backspace}", "N")
v_InputH.Start()
}
It seems I was wrong, what I've investigated as follows:
Code: Select all
F_InputHookOnEnd(ih) ;for debugging purposes
{
global ;assume-global mode of operation
local KeyName := ""
KeyHistory
KeyName := ih.EndKey
FileAppend, % A_Hour . ":" . A_Min . ":" . A_Sec . ":" . "|" . ++v_LogCounter . "|" . "OnEnd" . "|" . KeyName
. "|" . "GetKeyName:" . "|" . GetKeyName(KeyName)
. "|" . "GetKeyVK:" . "|" . GetKeyVK(KeyName)
. "|" . "GetKeySC:" . "|" . GetKeySC(KeyName)
. "|" . "`n", % v_LogFileName
MsgBox, 48, % SubStr(A_ScriptName, 1, -4) . ":" . A_Space . TransA["error"], % "Input hook has unexpectedly finished its operation" . "`n`n"
. "KeyName:" . KeyName . "`n"
. "More on that in log file:" . "`n"
. v_LogFileName
}
Code: Select all
10:30:48:|25|OnEnd||GetKeyName:||GetKeyVK:|0|GetKeySC:|0|
...
16:16:29:|28|OnEnd||GetKeyName:||GetKeyVK:|0|GetKeySC:|0|
Kind regards, mslonik ()