20tab / UnrealEnginePython

Embed Python in Unreal Engine 4
MIT License
2.75k stars 746 forks source link

keyboard input #875

Closed anmol438 closed 2 years ago

anmol438 commented 2 years ago

How do I detect keyboard input with python. I want do some movement when a keyboard key is detected by the script. Can anyone help in this?

Thank You

UtkarshMoholkar commented 2 years ago

image Details > input > Auto Receive Input

Make it "Player 0" (By default it is disabled) Please refer screenshot. I hope this may help.

anmol438 commented 2 years ago

Thanks @UtkarshMoholkar, I wanted to detect keyboard input by python scripting. I have found the solution. I installed keyboard module with pip which give some functions to detect the keyboard responses.