¶ How to Press Random Key
- Create an aura.
- Add
HotkeyIsActive to it and bind it to a convenient button (this will be our on/off switch, in the example it's F3), change the activation type to Click/Hold.
- Add a
C# Script action to On Enter.
- Copy and paste the script itself.
- Pressing
F3 will launch Notepad.
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