[pygtk] Alt+Return accelerator

Nikos Kouremenos kourem at gmail.com
Wed Dec 28 21:13:24 WST 2005


eventhough both pygtk ref and I think FAQ has it:

	def on_change_status_message_dialog_key_press_event(self, widget, event):
		if event.keyval == gtk.keysyms.Return or \
		event.keyval == gtk.keysyms.KP_Enter:  # catch CTRL+ENTER
			if (event.state & gtk.gdk.CONTROL_MASK): # U CHANGE THIS FOR ALT
(MOD1 or sth) see refs
				print 'BOOM'

On 12/28/05, Jamie Norrish <jamie at artefact.org.nz> wrote:
> I wish to specify an accelerator of Alt+Return for a Properties menu
> item, as per the GNOME HIG, but cannot find how to express the
> Return part. I have tried various possibilities to no avail, and
> searching is made difficult by the other uses of the word. What is the
> correct form, and where is this documented, if anywhere?
>
> Jamie
> _______________________________________________
> pygtk mailing list   pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
>


--
Nikos Kouremenos | Jabber ID: nkour at jabber.org | http://members.hellug.gr/nkour


More information about the pygtk mailing list