Input

You can modify inputs directly from the API. This includes mouse and keyboard events.

The key value requested by functions are Windows Virtual-Key Codes.

"MoveMouse" takes in 2 ints as an argument and moves the mouse accordingly. When the menu is open, this function will be skipped. If the value of the arguments are too high, it will be skipped as well.

MoveMouse(50, 50) --move right and down

"GetKeyState" returns true if the specified key is pressed.

if GetKeyState(69) then Print("Key pressed") end

"SetKeyState" takes in 2 ints as an argument. The first one is the key value, the second is the state. As for the state, 0 means 'press' and 1 means 'release'.

SetKeyState(69, 0) --press the key


On This Page
Input