Re: Gtktext question



On 03/02/01 C Y wrote:
Is there any way for one part of an application to
know what each keystroke going into a gtktext window
is, and be able to run a subroutine is a certain
keystroke or sequence of keystrokes is entered?  In
other words is there any way to watch gtktext, and if
someone presses Shift-Enter run some algorithum on the
text?  Sorry if this is an obvious question but I
can't seem to find any way that gtktext returns any
information about what specific characters are being
entered, or any way of setting up custom keybindings
for gtktext.  Is there any way?  Or some other widget
which will allow the same thing?  Or maybe a perl
trick?  

You need to connect to the "key_press_event" and check
the second argument you get in the callback (its a Gtk::Gdk::Event).

lupus

-- 
-----------------------------------------------------------------
lupus debian org                                     debian/rules
lupus ximian com                             Monkeys do it better




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]