Mouse & Keyboard
On this page
Simulates a keyboard button press.
Simulated Keypresses might not work in games that have anti-cheat protection. Ensure that both SAMMI and the program you want to simulate the keyboard press in are run in Administrator mode.
| Box Name | Type | Description |
|---|---|---|
| Button | Dropdown | Keyboard button to press |
| Ctrl/Alt/Shift | Checkbox | Whether you want to add any modifiers, i.e. press Ctrl + K |
| Hold Duration (ms) | Number | For how long to hold the button in milliseconds |
Checks if a specific button is currently pressed.
| Box Name | Type | Description |
|---|---|---|
| Save Variable As | String | Variable to save the result into. 0 = not pressed, 1 = pressed |
| Button | Dropdown Menu | Keyboard button to check |
Pauses a button execution and waits until a specific button is pressed/unpressed to continue with the rest of the commands.
| Box Name | Type | Description |
|---|---|---|
| Button | Dropdown | Which button to wait for |
| Press | Checkbox | Checked = wait until the button is pressed, Unchecked = wait until the button is not pressed |
| Timeout After (ms) | Number | How long to wait until resuming normal command flow in milliseconds |
Simulates a mouse click. Might not work in games that have anti-cheat protection.
| Box Name | Type | Description |
|---|---|---|
| Mouse Button | Dropdown | Which mouse button to click |
| Duration (ms) | Number | Duration of the click in milliseconds |
Changes the position of your mouse according to your screen.
You can retrieve your current mouse coordinates by using permanent global variables:
global.mouse_xfor mouse X positionglobal.mouse_yfor mouse Y position
| Box Name | Type | Description |
|---|---|---|
| Screen X position | Number | New X position for your mouse |
| Screen Y position | Number | New Y position for your mouse |