[pygtk] Implementing command history with a gtk.Entry
N. French
nbm_clan at yahoo.com
Tue Jul 25 01:47:44 WST 2006
I have a class that packs a gtk.Entry with a gtk.TextView to make an
interactive console. Works great but I would like to add a command
history; when the user presses up or down I want to go modify the
entry's text to whatever I have stored in the history.
My problem is: how do I catch the up/down arrow keypresses? I was
looking at the gtk.Entry "move-cursor" signal but it wasn't clear how I
would distinguish an up or down arrow from left or right, or if this
even catches cursor movement other than left and right.
Any input is appreciated.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the pygtk
mailing list