[virt-tools-list] [PATCH v2] Virt-manager: Add configurable grab keys

Michal Novotny minovotn at redhat.com
Mon Aug 23 14:49:11 UTC 2010


Hi,
this is the patch to add configurable grab keys to the virt-manager I 
did in my spare time for my own purposes originally (and also it's 
partially based on a request from a collegue in our office). It requires 
at least Gtk-VNC 0.4.0 since git commit 378721ec1 of Gtk-VNC introduced 
this feature. It's been tested and this patch is for the latest 
mercurial codebase of VMM and a bug 616355 ( [RFE] Add configurable grab 
key sequences for VMM) has been filed by myself some time ago for this 
request.

This is the second version of the patch that's including the exception 
handling for case the user is using some older version of Gtk-VNC 
(pre-0.4.0) that doesn't support the configurable grab keys. For the VMM 
interface itself, a new tab in preferences dialog, called "Keys", has 
been added showing the current grab keys combination and new GConf entry 
is being written when edited. Also, when you press the "Define" button 
on this tab a new dialog window is being opened and you have to press 
all the keys you want to use as grab keys and when you have all the keys 
you want to use in your combination pressed you have to click OK button 
to allow VMM to remember it.

Also, one slight issue is when you opened the console window already 
since the grab key combination is being read only on init() apparently 
so when changing the grab keys combination the restart of virt-manager 
is recommended.

I also considered the advices Cole gave me when implementing this new 
version and the check-pylint was returning no errors and/or warnings as 
well.

Differences between version 1 and version 2 (this one):
  - Implement the grab_keys_supported() method to check for configurable 
grab keys support in the GTK-VNC version currently installed
  - Grab key sequence is configurable in Prefs-> VM Details and "Change" 
button is disabled when GTK-VNC doesn't support it - tooltip is being shown
  - Exception handling when somebody manually edited the grab-keys in 
GConf has been added to ignore invalid (non-integer) key codes

Please write me your feedback on this version.

Thanks,
Michal

-- 
Michal Novotny<minovotn at redhat.com>, RHCE
Virtualization Team (xen userspace), Red Hat

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vmm-add-configurable-grab-key-combination.patch
Type: text/x-patch
Size: 15204 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20100823/5ee27a2b/attachment.bin>


More information about the virt-tools-list mailing list