[pygtk] Simple key binding

chaouche yacine yacinechaouche at yahoo.com
Mon Aug 16 19:58:39 WST 2010


Hello,

I want my application to quit when I press ctrl-q. I don't want to have menus. What is the simplest way to do this ? what is the best way to do this ?

My code is as simple as :

<code>
import pygtk
pygtk.require("2.0")
import gtk

w = gtk.Window()
w.show()
gtk.main()
</code>

What should I add to this code to make it happen ?

Thank you for you help.


Y.Chaouche


      


More information about the pygtk mailing list