Skip to content

overview

These functions allow you to control the user keyboard. This does not communicate with the kernel driver. This will only work from a usermode standpoint.

Only the humanizer has access to the Kernel Driver.

moonlight.windows.keyboard.down

Parameters

  • number key

Remarks

  • Simulates a key on your keyboard being HELD down.
  • Please use moonlight.windows.keyboard.up after you use this or else your computer will have the key stuck down until you restart your system.

moonlight.windows.keyboard.up

Parameters

  • number key

Remarks

  • Simulates a key on your keyboard being released.
  • This should only be done after moonlight.windows.keyboard.down or if you know the user is holding a key down. If you randomly use this function, the user will never be able to press that key again until they restart their system.

moonlight.windows.keyboard.press

Parameters

  • number key
  • number sleep

Remarks

  • Simulates a key on your keyboard being pressed and released.
  • The sleep parameter is the breathing time between the down and up. This is based on milliseconds. Recommendation is to have this at 1 or else your game will hang.
  • This is basically calling moonlight.windows.keyboard.down and then moonlight.windows.keyboard.up right after.