[Gtk-sharp-list] Getting Keyboard Input
Lee Mallabone
gnome@fonicmonkey.net
11 Apr 2003 09:50:02 +0100
On Fri, 2003-04-11 at 09:39, Charles Iliya Krempeaux wrote:
> I should know this, but... how do you get keyboard input
> into a Gtk# program?
>
> I remember it having to do something with Gdk#. (And thus,
> I'm guessing that there is some Gdk# event for handling it.)
> But what, exactly, is it?
You can set:
foo.Events |= Gdk.EventMask.KeyPressMask;
to enable key events on foo, where foo is a Gdk.Window or a Gtk.Widget.
The Widget has a whole bunch of event handlers, key press is one of them - can't remember how you hook into the Gdk.Window events manually.
hth,
Lee.