Skip to content Skip to sidebar Skip to footer

Forwarding Keypresses In Gtk

I'm writing a bit of code for a Gedit plugin. I'm using Python and the interface (obviously) is GTK. So, the issue I'm having is quite simple: I have a search box (a gtk.Entry) and

Solution 1:

Not a proper answer to the question (I don't know how to forward key presses), but there's an alternative solution to your problem.

Manipulate the TreeView cursor/selection directly, for example:

path, column = browser.get_cursor()
browser.set_cursor((path[0] + 1,)) # Down

Solution 2:

Did you include the key-press-event in the list of events the widget is allowed to receive? You can do that by calling

browser.add_events(gtk.gdk.KEY_PRESS_MASK)

Post a Comment for "Forwarding Keypresses In Gtk"