The function below includes the random move function within it. It uses an array of positions to move the actor to a new location (defaulting to the actor that this function is in). It also randomly sets a timer and calls RandomMove again after a set amount of time. In your even graph, connect this function to your ‘pressed.’ Once you press your key, the function starts, and it will automatically keep looping.
http://itzra.in/l2ain/share/screenshots/UE4Editor_2017-11-30_18-08-50.png