A few thoughts:
If you just assign tilde as the hotkey, then there's nothing waiting
except AutoKey itself (which already knows how to do that and is doing
it anyway.)
If you do this, you will lose the normal tilde key unless you use an
appropriately restrictive window filter so it only works on certain
windows. If instead, you use a modifier key with tilde as the hotkey,
then that would be very unlikely to conflict with anything else.
Mouse events are listed in the API documentation
https://autokey.github.io/index.html
mouse.click_relative_self(0, 0, 1)
looks like it will do what you want. It will do a left click wherever
the mouse cursor currently is positioned (unless you have a left-handed
mouse).
If you need to be able to toggle this feature on and off, that will take
a bit more thought and effort.
Using an indefinite/infinite loop script:
Although AutoKey is multi-threaded and will allow it, some of the
libraries it uses aren't great with this, so writing scripts that run
forever might make AutoKey unstable - which might affect the rest of
your desktop environment (DTE).
You'd also have to figure out how to catch the desired keypress event.
Since AutoKey can do it, you should be able to do it too, but since
AutoKey is already doing it, that would probably complicate things.
Joe
> --
> You received this message because you are subscribed to the Google
> Groups "autokey-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
autokey-user...@googlegroups.com
> <mailto:
autokey-user...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/autokey-users/50a62e95-7262-4d4a-86ab-436405a29715%40googlegroups.com
> <
https://groups.google.com/d/msgid/autokey-users/50a62e95-7262-4d4a-86ab-436405a29715%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit
https://groups.google.com/d/optout.