0
$\begingroup$

I'm new to python.

I've an input field and would like to execute a function, after the user typed in a string and pressed the return key.

The basic routine already works, but I use a button to execute the function to process the user input.

I would like to know if there's a way to use the return key instead of excuting the function by pressing a button.

Basically: The user types something in and press return: the funtion executes.

Thank you Chris

$\endgroup$

1 Answer 1

0
$\begingroup$

You could use Application Handlers (bpy.app.handlers) or Message Bus (bpy.msgbus) to track if something changes(some property in this case). Handler might get very intense since it would probably have to run constantly, so Message Bus might be way better if possible.

$\endgroup$
2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .