KeyboardAPI

Discussion in 'Wiki' started by DreTaX, Oct 24, 2018.

  1. DreTaX
    Offline

    DreTaX Probably knows the answer... Administrator

    Joined:
    Jun 29, 2014
    Messages:
    3,885
    Likes Received:
    677
    KeyboardAPI
    Description:

    From 1.9.0 RustBuster now supports sending DirectX keystrokes to the game.
    You can send mouse, and keyboard inputs.

    Code (C#):

    // Simulate that the key is being pressed down.
    KeyboardAPI.SendKey(KeyboardAPI.DirectXKeyStrokes.DIK_F2, false, KeyboardAPI.InputType.Keyboard);
    // Simulate that the key is not pressed anymore, therefore It was pressed.
    KeyboardAPI.SendKey(KeyboardAPI.DirectXKeyStrokes.DIK_F2, true, KeyboardAPI.InputType.Keyboard);
     
    You may also simulate mouse inputs:
    Code (C#):

    KeyboardAPI.SendKey(KeyboardAPI.DirectXKeyStrokes.DIK_LEFTMOUSEBUTTON, false, KeyboardAPI.InputType.Mouse);

    KeyboardAPI.SendKey(KeyboardAPI.DirectXKeyStrokes.DIK_LEFTMOUSEBUTTON, true, KeyboardAPI.InputType.Mouse);
     
     
    #1
    • Winner Winner x 1
    • Useful Useful x 1

Share This Page