Skip to main content

Thread: [Python]Run a widget without window being focussed


hi hav written code in pygtk captures keys user presses while widget running..but when in focus...so thre can make run without in focus....???
code is
code:
import pygtk,gtk def on_key_press_event(widget, event):     keyname = gtk.gdk.keyval_name(event.keyval)     print "key %s (%d) pressed" % (keyname, event.keyval)  w = gtk.window() w.connect('key_press_event', on_key_press_event) w.show_all() w.connect("destroy",lambda wid:gtk.main_quit()) gtk.main()

quote posted dhiraj thakur(invincible) view post
hi hav written code in pygtk captures keys user presses while widget running..but when in focus...so thre can make run without in focus....???
code is
code:
import pygtk,gtk  def on_key_press_event(widget, event):      keyname = gtk.gdk.keyval_name(event.keyval)      print "key %s (%d) pressed" % (keyname, event.keyval)    w = gtk.window()  w.connect('key_press_event', on_key_press_event)  w.show_all()  w.connect("destroy",lambda wid:gtk.main_quit())  gtk.main()
not gtk+. think this: gtk.main() running in context of program, catch signals program gets... nothing else.

have interface x server, system component in charge of detecting keypresses in graphical display session. @ this: http://www.larsen-b.com/article/184.html


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [Python]Run a widget without window being focussed


Ubuntu

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support