KeyboardAPI

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
3,958
1,181
113
At your house.
github.com
Description:

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

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:
C#:

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

KeyboardAPI.SendKey(KeyboardAPI.DirectXKeyStrokes.DIK_LEFTMOUSEBUTTON, true, KeyboardAPI.InputType.Mouse);
 
  • Winner
  • Useful
Reactions: Revezunds and salva