Enable to send F10 key to the guest OS.
The F10 key is assigned as the accelerator of the menu bar in the OS(Windows or
Linux). On this account it is necessary to send the F10 key to the guest OS. However, with the existing specifications of virt-viewer, the F10 key is assigned to the accelerator of the menu bar of virt-viewer and we cannot send the F10 key to the guest OS. So, I change virt-viewer to be able to send F10 key to the guest OS when virt-viewer grabs the keyboard. Thanks, Signed-off-by: Hiroyuki Kaguchi <fj7025cf@aa.jp.fujitsu.com> _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools@redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools |
Enable to send F10 key to the guest OS.
On 2008/05/23 11:51, Hiroyuki Kaguchi wrote:
> The F10 key is assigned as the accelerator of the menu bar in the OS(Windows or > Linux). > On this account it is necessary to send the F10 key to the guest OS. > However, with the existing specifications of virt-viewer, the F10 key is > assigned to the accelerator > of the menu bar of virt-viewer and we cannot send the F10 key to the guest OS. > So, I change virt-viewer to be able to send F10 key to the guest OS when > virt-viewer grabs the keyboard. I forgot to attach the patch. I attach it. Thanks, Hiroyuki Kaguchi diff -r 5299a3aaebb5 src/main.c --- a/src/main.c Sun Apr 27 23:41:26 2008 -0400 +++ b/src/main.c Wed May 21 17:35:09 2008 +0900 @@ -116,6 +116,8 @@ static void viewer_grab(GtkWidget *vnc, for (i = 0 ; i < LAST_MENU; i++) { gtk_label_set_text_with_mnemonic(GTK_LABEL(menuIte ms[i].label), menuItems[i].grabbed_text); } + + gtk_settings_set_string_property(gtk_settings_get_ default(), "gtk-menu-bar-accel", "", ""); } static void viewer_ungrab(GtkWidget *vnc, GtkWidget *window) @@ -127,6 +129,8 @@ static void viewer_ungrab(GtkWidget *vnc for (i = 0 ; i < LAST_MENU; i++) { gtk_label_set_text_with_mnemonic(GTK_LABEL(menuIte ms[i].label), menuItems[i].ungrabbed_text); } + + gtk_settings_set_string_property(gtk_settings_get_ default(), "gtk-menu-bar-accel", "F10", ""); } static void viewer_shutdown(GtkWidget *src G_GNUC_UNUSED, void *dummy G_GNUC_UNUSED, GtkWidget *vnc) _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools@redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools |
Enable to send F10 key to the guest OS.
> On 2008/05/23 11:51, Hiroyuki Kaguchi wrote:
>> The F10 key is assigned as the accelerator of the menu bar in the OS(Windows or >> Linux). >> On this account it is necessary to send the F10 key to the guest OS. >> However, with the existing specifications of virt-viewer, the F10 key is >> assigned to the accelerator >> of the menu bar of virt-viewer and we cannot send the F10 key to the guest OS. >> So, I change virt-viewer to be able to send F10 key to the guest OS when >> virt-viewer grabs the keyboard. > Would you give me a comment on this patch? If not, please apply it. Thanks, Hiroyuki Kaguchi _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools@redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools |
Enable to send F10 key to the guest OS.
On 2008/05/23 12:04, Hiroyuki Kaguchi wrote:
> On 2008/05/23 11:51, Hiroyuki Kaguchi wrote: >> The F10 key is assigned as the accelerator of the menu bar in the OS(Windows or >> Linux). >> On this account it is necessary to send the F10 key to the guest OS. >> However, with the existing specifications of virt-viewer, the F10 key is >> assigned to the accelerator >> of the menu bar of virt-viewer and we cannot send the F10 key to the guest OS. >> So, I change virt-viewer to be able to send F10 key to the guest OS when >> virt-viewer grabs the keyboard. > > I forgot to attach the patch. > I attach it. > Hi, Dan Please review this patch. Thanks Hiroyuki Kaguchi _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools@redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools |
Enable to send F10 key to the guest OS.
On Fri, May 23, 2008 at 12:04:38PM +0900, Hiroyuki Kaguchi wrote:
> On 2008/05/23 11:51, Hiroyuki Kaguchi wrote: > > The F10 key is assigned as the accelerator of the menu bar in the OS(Windows or > > Linux). > > On this account it is necessary to send the F10 key to the guest OS. > > However, with the existing specifications of virt-viewer, the F10 key is > > assigned to the accelerator > > of the menu bar of virt-viewer and we cannot send the F10 key to the guest OS. > > So, I change virt-viewer to be able to send F10 key to the guest OS when > > virt-viewer grabs the keyboard. The idea of the patch is a good one, but I think it is possible for the user to customize the accelerator for menus. So by clearing the accelerator and then resetting it to "F10" we would be overriding the user's customization. So before clearing the accelerator we should first make a record of what the current setting is. This will let us correctly restore it later. > diff -r 5299a3aaebb5 src/main.c > --- a/src/main.c Sun Apr 27 23:41:26 2008 -0400 > +++ b/src/main.c Wed May 21 17:35:09 2008 +0900 > @@ -116,6 +116,8 @@ static void viewer_grab(GtkWidget *vnc, > for (i = 0 ; i < LAST_MENU; i++) { > gtk_label_set_text_with_mnemonic(GTK_LABEL(menuIte ms[i].label), menuItems[i].grabbed_text); > } > + > + gtk_settings_set_string_property(gtk_settings_get_ default(), "gtk-menu-bar-accel", "", ""); > } > > static void viewer_ungrab(GtkWidget *vnc, GtkWidget *window) > @@ -127,6 +129,8 @@ static void viewer_ungrab(GtkWidget *vnc > for (i = 0 ; i < LAST_MENU; i++) { > gtk_label_set_text_with_mnemonic(GTK_LABEL(menuIte ms[i].label), menuItems[i].ungrabbed_text); > } > + > + gtk_settings_set_string_property(gtk_settings_get_ default(), "gtk-menu-bar-accel", "F10", ""); > } > > static void viewer_shutdown(GtkWidget *src G_GNUC_UNUSED, void *dummy G_GNUC_UNUSED, GtkWidget *vnc) Regards, Daniel. -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| _______________________________________________ et-mgmt-tools mailing list et-mgmt-tools@redhat.com https://www.redhat.com/mailman/listinfo/et-mgmt-tools |
| All times are GMT. The time now is 10:10 PM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.