下面获取sc码的ahk脚本有什么问题吗, 与实际sc码不符
脚本是安装AutoHotInterception后, Development Tools文件夹中的脚本.
问了一圈gpt, 没能解决
图片中, 实际sc码应该是053, 而AHK ScanCode tester给出的是83
代码如下:
#SingleInstance force
/*
Tool for checking what InputHook reports in AHK
*/
Sleep 100 ; When hitting F5 to run script in SciTE, release of F5 appears in list. Suppress
ih := InputHook()
ih.KeyOpt("{All}", "SN")
ih.OnKeyDown := Func("AhkKeyEvent").Bind(1)
ih.OnKeyUp := Func("AhkKeyEvent").Bind(0)
ih.Start()
Gui, Add, ListView, h200, Key Name|SC|State
LV_ModifyCol(1, 100)
LV_ModifyCol(2, 50)
LV_ModifyCol(3, 50)
Gui, Show,, AHK ScanCode tester
return
AhkKeyEvent(state, ih, vk, sc){
row := LV_Add(, GetKeyName("SC" DecToHex(sc)), sc, state)
LV_Modify(row, "Vis")
}
DecToHex(val){
return Format("{:X}", val)
}
GuiClose:
ExitApp