1
Mach4 General Discussion / Re: Keyboard Inputs enabled right after Mach4 starts
« on: January 19, 2022, 08:59:51 AM »
I think the simplest way is an add this Keyboard InputsToggle() here:
Or try add KeyboardInputsToggle() to UP and DOWN script of Enable button.
Code: [Select]
-------------------------------------------------------
-- PLC First Run
-------------------------------------------------------
if (testcount == 1) then --Set Keyboard input startup state
local iReg = mc.mcIoGetHandle (inst, "Keyboard/Enable")
mc.mcIoSetState(iReg, 1) --Set register to 1 to ensure KeyboardInputsToggle function will do a disable.
KeyboardInputsToggle() -- This make KeyboardInputsToggle disable
prb.LoadSettings()
KeyboardInputsToggle() --This make KeyboardInputsToggle enable
Or try add KeyboardInputsToggle() to UP and DOWN script of Enable button.