On Tue, Feb 16, 2010 at 2:51 PM, Alexander Kuleshov <kuleshovm...@gmail.com> wrote: > Hi to all. I have menu on my form and gtktextview: > I create imageitemmenu: > > self.file_new = gtk.ImageMenuItem(gtk.STOCK_NEW, agr) > key,mod = gtk.accelerator_parse("N") > self.file_new.add_accelerator("activate", agr, key, mod, > gtk.ACCEL_VISIBLE) > > But when i press n in textview at this time triggered file_new menu > activate... How can i resolve it? And how can i make hot keys for > example CTRL + W + S? > Thank you. > _______________________________________________ > pygtk mailing list pygtk@daa.com.au > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://faq.pygtk.org/ >
For your first question, you would want to do something like: key,mod = gtk.accelerator_parse("<Control>n") so that it only works when you press both the control and n key. -- Simon Vermeersch _______________________________________________ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/