[webkit-gtk] Enriching Keyboard Events with a Device Id
Muriel Bowie
muriel.bowie at unifr.ch
Fri Aug 20 02:22:25 PDT 2010
Hi all,
I am trying to enrich keyboard events with a device id in WebKit, so
Javascript can determine which device sent the keyboard input.
In gtk+-3.0 I can do this by using GdkEvent instead of GdkEventKey in
the callback:
static void key_press_callback(GtkWidget *widget,
GdkEvent *event,
GtkWidget *entry )
{
/*get the device */
GdkDevice *device = gdk_event_get_device(event);
/* do something ... */
}
GtkWidget *entry;
entry = gtk_entry_new ();
gtk_widget_set_support_multidevice(entry, TRUE);
/* set up callback with: */
g_signal_connect(entry, "key-press-event",
G_CALLBACK(key_press_callback), entry);
For WebKit, I couldn't identify how I could do this since GdkEventKey
doesn't have a device.
Where are GTK events managed in WebKit and how could I add a device id
to keyboard events?
Cheers,
Muriel
More information about the webkit-gtk
mailing list