CheckKeyState
CheckKeyState is a node that checks whether a specific keyboard key is currently pressed. If the chosen key is held down at the moment of the check, the node returns Success; otherwise it returns Failure.

How to use
- Specify the key in the Hotkey parameter.
- Insert the node where you need it in the scenario.
- On each run it performs the check:
- If the key is pressed, CheckKeyState returns
Success. - If it isn't pressed, it returns
Failure.
- If the key is pressed, CheckKeyState returns
If no key is selected, the result will always be
Failure.
Example
Sequence
├── CheckKeyState (Hotkey = F1)
├── DoSomethingWhileF1Pressed
In this example the actions in DoSomethingWhileF1Pressed run only while the user holds F1.
What is it good for?
- Create branches in the tree that work only while a certain key is held, adjusting behavior on the fly.