Re: [pygtk] key_release_event of the mod1 ("alt") key does not work
I tested your code in my system: Windows 2000 Python 2.2 PyGTK 2.0.0 and I got some odd behaviours: - On Windows my right alt key produces the left alt key keyval in the release callback. - On Windows I don't get left alt key release events - On Windows for some keys if I left them pressed for a while I get a lot of release events and I shouldn't get any. - On Linux everything works as expected. Note: I cc to gtk-app-devel because this seems more a GTK+ bug than a PyGTK one. AFAIK there is no particular event handling in PyGTK. Regards Lorenzo El vie, 27-02-2004 a las 14:34, [EMAIL PROTECTED] escribió: > I test again with your code and found out, in combination with another key > like a accelerator/shortcut (e.g."ALT"+Q) i get a release event from both > keys (113, 65513), but from "ALT" alone i get no callback. > > martin > -- > import gtk > > def foo(widget, event): > print widget > print event.keyval > > w = gtk.Window() > w.add_events(gtk.gdk.KEY_RELEASE_MASK) > w.connect("key-release-event", foo) > w.show_all() > > gtk.mainloop() > > > > > Christian Robottom Reis <[EMAIL PROTECTED]> > Sent by: [EMAIL PROTECTED] > 27.02.2004 10:03 > > To > [EMAIL PROTECTED] > cc > [EMAIL PROTECTED] > Subject > Re: [pygtk] key_release_event of the mod1 ("alt") key does not work > > > > > > > On Wed, Feb 25, 2004 at 04:39:37PM +0100, [EMAIL PROTECTED] > wrote: > > I want select first item of the menubar, if "Alt" (in gtk named mod1; i > do > > not mean Alt Gr) released. I connect the key-release-event and it work > > for all other keys, but not for Mod1. For Mod1 i get only the keypressed > > > event. > > That's odd. I can't reproduce your problem here locally with the > following testcase: > > import gtk, GDK > > def foo(*args): > print args > > w = gtk.GtkWindow() > w.add_events(GDK.KEY_RELEASE_MASK) > w.connect("key-release-event", foo) > w.show_all() > > gtk.mainloop() > > (which, yes, is based on PyGTK 0.6). If you're doing the pygtk2 > equivalent, ISTM this is a bug, and if so, it's probably in the GTK+ > port of Win32. Can anybody with pygtk2 check if this works for them? > > Take care, > -- > Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331 > ___ > pygtk mailing list [EMAIL PROTECTED] > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ > > > ___ > pygtk mailing list [EMAIL PROTECTED] > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] key_release_event of the mod1 ("alt") key does not work
I test again with your code and found out, in combination with another key like a accelerator/shortcut (e.g."ALT"+Q) i get a release event from both keys (113, 65513), but from "ALT" alone i get no callback. martin -- import gtk def foo(widget, event): print widget print event.keyval w = gtk.Window() w.add_events(gtk.gdk.KEY_RELEASE_MASK) w.connect("key-release-event", foo) w.show_all() gtk.mainloop() Christian Robottom Reis <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 27.02.2004 10:03 To [EMAIL PROTECTED] cc [EMAIL PROTECTED] Subject Re: [pygtk] key_release_event of the mod1 ("alt") key does not work On Wed, Feb 25, 2004 at 04:39:37PM +0100, [EMAIL PROTECTED] wrote: > I want select first item of the menubar, if "Alt" (in gtk named mod1; i do > not mean Alt Gr) released. I connect the key-release-event and it work > for all other keys, but not for Mod1. For Mod1 i get only the keypressed > event. That's odd. I can't reproduce your problem here locally with the following testcase: import gtk, GDK def foo(*args): print args w = gtk.GtkWindow() w.add_events(GDK.KEY_RELEASE_MASK) w.connect("key-release-event", foo) w.show_all() gtk.mainloop() (which, yes, is based on PyGTK 0.6). If you're doing the pygtk2 equivalent, ISTM this is a bug, and if so, it's probably in the GTK+ port of Win32. Can anybody with pygtk2 check if this works for them? Take care, -- Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331 ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Re: [pygtk] key_release_event of the mod1 ("alt") key does not work
On Wed, Feb 25, 2004 at 04:39:37PM +0100, [EMAIL PROTECTED] wrote: > I want select first item of the menubar, if "Alt" (in gtk named mod1; i do > not mean Alt Gr) released. I connect the key-release-event and it work > for all other keys, but not for Mod1. For Mod1 i get only the keypressed > event. That's odd. I can't reproduce your problem here locally with the following testcase: import gtk, GDK def foo(*args): print args w = gtk.GtkWindow() w.add_events(GDK.KEY_RELEASE_MASK) w.connect("key-release-event", foo) w.show_all() gtk.mainloop() (which, yes, is based on PyGTK 0.6). If you're doing the pygtk2 equivalent, ISTM this is a bug, and if so, it's probably in the GTK+ port of Win32. Can anybody with pygtk2 check if this works for them? Take care, -- Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331 ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] key_release_event of the mod1 ("alt") key does not work
Hello I want select first item of the menubar, if "Alt" (in gtk named mod1; i do not mean Alt Gr) released. I connect the key-release-event and it work for all other keys, but not for Mod1. For Mod1 i get only the keypressed event. Maybe helpfull information: I am a Windows 2k user with german windows keyboard. Python 2.3.0 GTK 2.2.4 PyGTK 2.0 martin ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/