caldurza / autokey

Automatically exported from code.google.com/p/autokey
GNU General Public License v3.0
0 stars 0 forks source link

Autokey does not close with CTRL+C #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Start autokey from a terminal
2. Press "CTRL+C" a few times.
3. Right click the autokey logo and "exit".

What is the expected output? What do you see instead?
Autokey should have quit at Step 2. In any case, in Step 3, Autokey does
not in fact quit but freezes and prints a traceback to standard output:
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/autokey/ui/notifier.py", line 83,
in on_quit
    def on_quit(self):
KeyboardInterrupt

Original issue reported on code.google.com by Luke.Faraone on 26 Aug 2009 at 3:31

GoogleCodeExporter commented 8 years ago
I don't think there's any way around this... there is already code in there to 
catch
KeyboardInterrupt and exit the main loop. It doens't actually work, so all that 
could
be done would be to remove this code and then at least the normal quit method 
would
still work after Ctrl+C

Original comment by cdekter on 24 Mar 2010 at 11:19

GoogleCodeExporter commented 8 years ago
AutoKey does quit when I do this, though I do get a traceback:

DEBUG - iomediator - <ctrl> pressed
INFO - root - Shutting down
INFO - service - Service shutting down
INFO - config-manager - Persisting configuration
INFO - config-manager - Backing up existing config file
INFO - config-manager - Finished persisting configuration - no errors
Traceback (most recent call last):
  File "/usr/bin/autokey-gtk", line 11, in <module>
    a.shutdown()
  File "/usr/lib/python2.5/site-packages/autokey/gtkapp.py", line 191, in shutdown
    gtk.main_quit()
RuntimeError: called outside of a mainloop

I don't know when or whether this changed.  This is with v0.70.1 on Ubuntu 
Hardy.  I
know 0.61.3 quit with Ctrl+C too.

Original comment by dv8box-...@yahoo.com on 13 Apr 2010 at 1:32

GoogleCodeExporter commented 8 years ago
The problem here stems from trying to exit the program from outside the main 
thread. This is invalid so I will remove it for now. Making it work properly is 
fairly complex and not really worthwhile, so I'm closing this.

Original comment by cdekter on 3 Oct 2010 at 1:11

GoogleCodeExporter commented 8 years ago
Ctrl+\ can be used for that.

Original comment by 8721e04a...@gmail.com on 28 Mar 2013 at 7:40