I remember answering this elsewhere, but I don't see it.
A couple of things.
The second method will work as written, but it might be a bit
more intuitive if, instead of deleting the stored variable, you
set it to a "false" value and retrieve and test that value. Then,
there shouldn't be a need to handle an exception caused by
attempting to get the value of a non-existent stored global
variable.
Since AutoKey treats <shift> as a modifier key, I'm not sure what keyboard.send_keys() will do when given a string that only contains modifier keys. You might have to run an AutoKey trace to see what's actually happening. You might be able to workaround this if it turns out to be a problem by sending "<shift> " (sending a shifted space key).
@Little Girl I wouldn't have thought of putting that whole thing
in a try: block, but apparently, it works. That's interesting. I
would have done a while True: loop with a break statement when the
retrieved variable is false or non-existent. I don't know if my
approach is any better than yours - it's just different.
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/autokey-users/af33976d-6da3-4631-b749-40178d222881n%40googlegroups.com.
Just tried a script which only sends one shift. AutoKey trace said it worked.
Tight loops can be a bear! I've been experiencing some in Brave and Vivaldi lately although I disabled some add-ons that were probably causing them. They might have also been driving swap crazy and may have massively aged my SSD drive. Not fun!
I have tried REISUB a number of times recently and determined
that I can't reach all those keys at the same time. I just looked
it up and I have been doing it wrong. You hold Ctrl+Alt down and
slowly press REISUB one at a time. Raising Elephants Is So Utterly
Boring!
I do have Ctrl+Alt+Backspace enabled (which restarts X11) and that helps sometimes. I also have an icon in my panel that runs xkill and that gets me out of some tight jams when things aren't totally locked up.
Ctrl+Alt+Del is supposed to do something as well, but I haven't
noticed anything when trying it. Just tried it again and it logs
me out after 30 seconds if I don't cancel it. I don't use Gnome
and I don't see any system manager to reassign those keys to.
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/autokey-users/0d5ce3c6-83d7-4ee0-9fa9-78044b25fcfdn%40googlegroups.com.