Skip to content

Add return codes to mouse.wait_for_click and keyboard.wait_for_keypress #659

@josephj11

Description

@josephj11

Has this issue already been reported?

  • I have searched through the existing issues.

Is this a question rather than an issue?

  • This is not a question.

What type of issue is this?

Enhancement

Which Linux distribution did you use?

N/A

Which AutoKey GUI did you use?

No response

Which AutoKey version did you use?

N/A

How did you install AutoKey?

N/A

Can you briefly describe the issue?

I want to know how a wait for click or keypress completed so I can use that information for flow control in scripts.

E.g. a loop continues indefinitely until the mouse is clicked. This has to distinguish between a timeout and a click.
The same thing with a loop terminated by a keypress.

Can the issue be reproduced?

N/A

What are the steps to reproduce the issue?

N/A

What should have happened?

These API calls should return 0 for success and one or more defined non-zero values to cover any alternatives. So far, 1 for timeout/failure is all that comes to mind.

What actually happened?

AFAIK, they do not return any status code - which is equivalent to returning 0 no matter what happened.

Do you have screenshots?

No response

Can you provide the output of the AutoKey command?

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions