How to Press Random Key
How to Press Random Key
- Create an aura.
- Add
HotkeyIsActiveto it and bind it to a convenient button (this will be our on/off switch, in the example it'sF3), change the activation type toClick/Hold. - Add a
C# Scriptaction toOn Enter. - Copy and paste the script itself.
- Pressing
F3will launchNotepad.
var randomKeys = new[] { Key.D1, Key.D2, Key.D4, Key.D5, Key.A, Key.D }; // list your random keys here
GetService<ISendInputUnstableScriptingApi>().KeyPress(randomKeys.PickRandom()); // press one of them