SetBlockInput(boolean)
Description
Section titled âDescriptionâThe SetBlockInput function is an internal function used during the system tests. It stops input from USB-connected keyboards and mouse. The built-in keyboard on some models is internally connected using a USB connection, which is also blocked by this function. The block affects the station where the function is executed.
![]() | Important: |
| Should the station be blocked and cannot be unblocked using a new Lua command, then pressing the keyboard keys A, S, D, and F simultaneously unblock the input again. |
Arguments
Section titled âArgumentsâ-
Boolean:
The boolean indicates if the stationsâ input should be blocked or unblocked.- true (or 1): The station input is blocked.
- false (or 0): The station input is unblocked.
This function does not return anything.
Example
Section titled âExampleâThis example blocks mouse and keyboard input for 10 seconds:
| Copy CodeLua |
| ``` |
| return function() |
-- Set a variable for yield time in secondsyieldTime = 10-- Set the block to trueSetBlockInput(true)-- Wait the [yieldtime]coroutine.yield(yieldTime)-- Unblock the stationSetBlockInput(false)end
