0
我有一個G602鼠標,我想使用DPI敏感按鈕(G10,G11)來控制我的G910鍵盤的M-Key狀態。我試圖寫一個Lua中它,但我在努力的M-國家重點基礎關閉API文檔樣本設置問題:使用G-Key腳本的Lua腳本編寫錯誤SetMkeyState
if event == "MOUSE_BUTTON_PRESSED" and arg == 11 then
SetMkeyState(1,"kb")
end
我得到以下錯誤:
[string "LuaVM"]:20: attempt to call global 'SetMkeyState' (a nil value)
我甚至嘗試從API文檔的確切樣品和我得到同樣的錯誤:
-- Set the current M Key state to M1 when G1 is pressed
function OnEvent(event, arg)
if (event == "G_PRESSED" and arg == 1) then
SetMkeyState(1);
end
end