Export to GitHub

autokey - issue #229

Stuck in Infinite Loop


Posted on Dec 5, 2012 by Happy Lion

What steps will reproduce the problem? 1. Create an AutoKey script with this: if window.get_active_class() in ['emacs.Emacs', 'gnome-terminal.Gnome-terminal']: keyboard.send_keys('<ctrl>+d') else: keyboard.send_keys('<delete>') 2. I mapped <ctrl>+d as the Hotkey for it. 3. Hold down CTRL+d for a second or two (might take less or more time on your computer). It will delete a number of characters then get stuck in an infinite loop, and no other AutoKey Hotkey will work.

What is the expected output? What do you see instead? It shouldn't get stuck in an infinite loop, but it does.

What version of the product are you using? On what operating system? I'm using auto-gtk 0.90.4 in Trisquel GNU/Linux.

Please provide any additional information below. I've tried debugging it by running autokey-gtk --verbose, but I can't figure out where it's getting stuck.

Comment #1

Posted on Mar 1, 2013 by Quick Dog

You are telling it to send the same keys that trigger the script. To me, it makes sense that it would get stuck in an infinite loop. It's similar to writing code like this:

foo() { foo(); }

For a work-around, have it send_keys('+d'), which is the same thing in emacs key bindings.

Status: New

Labels:
Type-Defect Priority-Medium