What function can do “simulated the keyboard key pressed by device"(Even if the game is minimized,it still work)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By fish2091852127

such as “Qick Maco”, i want to use Godot make a plug-in for other application,Godot’s plug-in to do simulated my keyboard key pressed, to effect that application,that application should accept my keyboard key pressed.

in my memories,it had some function in Godot?

such as"Godot to do simulated my mouse device to runing and click",it is effected in entire operating system.

:bust_in_silhouette: Reply From: Magso

There’s no dedicated function for this but this code

func _input(event):

Will print any inputs including keystrokes which could be shared via a json file.