[gtk-vnc-devel] [PATCH] Add an interface for sending raw key presses
- From: Anthony Liguori <anthony codemonkey ws>
- To: gtk-vnc-devel List <gtk-vnc-devel lists sourceforge net>
- Subject: [gtk-vnc-devel] [PATCH] Add an interface for sending raw key presses
- Date: Tue, 23 Oct 2007 22:26:29 -0500
I tried to use send_keys() for kvm-test but it wasn't sufficient. I'm
unhappy that we have to have both interfaces but I still think most
users would prefer send_keys().
Regards,
Anthony Liguori
Add an interface for sending raw key press events.
diff -r 96688380ad41 src/libgtk-vnc_sym.version
--- a/src/libgtk-vnc_sym.version Tue Oct 23 22:11:12 2007 -0500
+++ b/src/libgtk-vnc_sym.version Tue Oct 23 22:13:27 2007 -0500
@@ -10,6 +10,7 @@
vnc_display_close;
vnc_display_send_keys;
+ vnc_display_send_key_raw;
vnc_display_set_credential;
diff -r 96688380ad41 src/vncdisplay.c
--- a/src/vncdisplay.c Tue Oct 23 22:11:12 2007 -0500
+++ b/src/vncdisplay.c Tue Oct 23 22:13:27 2007 -0500
@@ -845,6 +845,13 @@ void vnc_display_send_keys(VncDisplay *o
gvnc_key_event(obj->priv->gvnc, 0, keyvals[i]);
}
+void vnc_display_send_key_raw(VncDisplay *obj, guint keyval, int press)
+{
+ if (obj->priv->gvnc == NULL || !gvnc_is_open(obj->priv->gvnc))
+ return;
+
+ gvnc_key_event(obj->priv->gvnc, press, keyval);
+}
static void vnc_display_destroy (GtkObject *obj)
{
diff -r 96688380ad41 src/vncdisplay.h
--- a/src/vncdisplay.h Tue Oct 23 22:11:12 2007 -0500
+++ b/src/vncdisplay.h Tue Oct 23 22:13:27 2007 -0500
@@ -73,6 +73,7 @@ void vnc_display_close(VncDisplay *obj)
void vnc_display_close(VncDisplay *obj);
void vnc_display_send_keys(VncDisplay *obj, const guint *keyvals, int nkeyvals);
+void vnc_display_send_key_raw(VncDisplay *obj, guint keyval, int press);
gboolean vnc_display_set_credential(VncDisplay *obj, int type, const gchar *data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]