[et-mgmt-tools][PATCH]:virt-viewer: Load "Send key" menu from XML file
Patrick Campbell
plc at novell.com
Wed Dec 17 15:05:32 UTC 2008
Daniel P. Berrange wrote:
> On Tue, Dec 16, 2008 at 01:50:22PM -0700, Pat Campbell wrote:
>
>> Attached patch modifies virt-viewer so that it acquires the "Send key"
>> menu contents from an xml file and allows user to load a browsed for
>> keymap def file while running.
>>
>
> I like the idea of making it configurable, but not the idea of having
> the user create & load XML files for this.
>
I agree that creating them is an issue, a keymap specific editor within
virt-viewer would be the ideal.
As to loading them I was thinking of a usage scenario where a user has
multiple unique VM to monitor or view. For instance a Linux, Windows XP
and a NetWare box. Each of these systems have different keys sequences,
enough so that one map might get rather lengthy.
In this scenario I thought they would use a bash function for each type:
nwviewer() { virt-viewer -k netware.xml "$1";}
lviewer() {virt-viewer -k linux.xml "$1";}
winxpviewer() {virt-viewer -k winxp.xml "$1";}
A little cumbersome but works. For the general case your profile idea
below would remove the need for this.
> If a user wants a custom send-key set, they'll likely want it preserved
> and used across all instances of virt-viewer automatically every time
> it is started rather than having to load the file.
>
In general they would always want the same custom set but I think they
need an easy command line option to load an alternative set when
necessary. I guess my bias for command line options as opposed to
clicking around menus is showing here.
> I think we should store the custom send-key sets in GConf, rather than
> XML files, and at the bottom of the 'send key' menu have an final
> entry 'Edit keys...' which pops up a dialog allowing the user to add
> or remove keys from the menu. Just letting them enter the key name (which
> we can validate by just doing a lookup on the string they enter). GConf
> would ensure changes in one instance are instant applied to all other
> running instances.
>
Not familiar with GConf, will look into that.
> If we want to get adventurous later on we could add 'profiles' to define
> a set of keys, allowing switching between profiles, and remember which
> profile is associated with each VM UUID. This would allow user to have
> one set of keys for Windows VMs, with anothe for Linux, and another
> for BSD or whatever.
>
> Daniel
>
Thanks for the feedback and suggestions.
Pat
More information about the et-mgmt-tools
mailing list