RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1791261 - Zoom hot keys labels are missing
Summary: Zoom hot keys labels are missing
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: virt-viewer
Version: 8.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.0
Assignee: Uri Lublin
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1791263
TreeView+ depends on / blocked
 
Reported: 2020-01-15 11:17 UTC by Radek Duda
Modified: 2021-05-18 15:53 UTC (History)
10 users (show)

Fixed In Version: virt-viewer-9.0-7.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1791263 (view as bug list)
Environment:
Last Closed: 2021-05-18 15:53:32 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screenshot (400.01 KB, image/png)
2020-01-16 09:01 UTC, Radek Duda
no flags Details
Screenshot (173.60 KB, image/png)
2020-01-16 09:08 UTC, Radek Duda
no flags Details

Description Radek Duda 2020-01-15 11:17:08 UTC
Description of problem:
In virt-viewer there are not hot key labels in View -> Zoom -> {Zoom {in,out}, Normal size}

Version-Release number of selected component (if applicable):
virt-viewer-7.0-9.el8.x86_64

How reproducible:
always

Steps to Reproduce:
1.Open remote-viewer by connectin to VM and got to Application menu -> View -> Zoom
2. See hot key labels are missing


Actual results:
Hot key labels are missing

Expected results:
User can find hot key labels:
'Zoom In'  Ctrl++
'Zoom Out' Ctrl+-
'Normal Size' Ctrl+0
or something like that.

Additional info:

Comment 1 zhoujunqin 2020-01-16 02:58:01 UTC
Hi Radek Duda,
I can't reproduce your issue with package version: virt-viewer-7.0-9.el8.x86_64

Steps:
1. Prepare a running guest.
2. Then connect the guest by virt-viewer or remote-viewer:
$ virt-viewer -c qemu:///system $guest
or
$ remote-viewer spice://$host:$port

Then click: View->Zoom, I can find hot key labels:
'Zoom In'  Ctrl++
'Zoom Out' Ctrl+-
'Normal Size' Ctrl+0

And it works well by clicking "Zoom In" and by using hotkey "Ctrl++".

Please help check your os again, is it the latest one, thanks.

BR,
juzhou.

Comment 2 Radek Duda 2020-01-16 08:59:28 UTC
Hi zhoujunqin,
I tried with latest virt-viewer-7.0-9.el8.x86_64 and I can reproduce this.
Surprisingly I can reproduce this only with RHV VMs - not with my local libvirt VMs (established using virt-manager)

reproduced with 
rhv-4.4.0-0.14.master.el7
and also with
rhv-4.3.8.2-0.1.master.el7

I really do not know what component to blame now.

Comment 3 Radek Duda 2020-01-16 09:01:31 UTC
Created attachment 1652672 [details]
Screenshot

No hot-key labels when connected to RHV VM

Comment 4 Radek Duda 2020-01-16 09:08:39 UTC
Created attachment 1652675 [details]
Screenshot

No hot-key labels when connected to RHV VM

Comment 5 zhoujunqin 2020-01-16 09:33:58 UTC
(In reply to Radek Duda from comment #2)
> Hi zhoujunqin,
> I tried with latest virt-viewer-7.0-9.el8.x86_64 and I can reproduce this.
> Surprisingly I can reproduce this only with RHV VMs - not with my local
> libvirt VMs (established using virt-manager)
> 
> reproduced with 
> rhv-4.4.0-0.14.master.el7
> and also with
> rhv-4.3.8.2-0.1.master.el7
> 
> I really do not know what component to blame now.

Hi Radek Duda,
Thanks for your quick reply.
Yes, I can also reproduce this issue when connect to RHV vm, thanks.

But I have tried that the hotkeys don't work.

@Victor, could you help have a look of this issue, thanks.

Comment 6 Radek Duda 2020-01-16 09:45:45 UTC
According to my testing - hot keys for zooming are fully functional

Comment 7 Radek Duda 2020-01-16 09:46:27 UTC
only labels are missing

Comment 9 Uri Lublin 2020-09-01 13:48:17 UTC
Happens also when connecting to VMs and changing the hotkeys
on command line:
remote-viewer --hotkeys=toggle-fullscreen=F  spice://host:port

Comment 11 Uri Lublin 2020-10-05 17:40:36 UTC
(In reply to Uri Lublin from comment #9)
> Happens also when connecting to VMs and changing the hotkeys
> on command line:
> remote-viewer --hotkeys=toggle-fullscreen=F  spice://host:port

That's seems to be on purpose: only hotkeys that are
specified by the command line are used, and default
ones are being removed.
Done by first calling virt_viewer_app_clear_hotkeys
and later setting each key separately.

Comment 12 Radek Duda 2020-10-06 08:59:10 UTC
Hi Uri,
I tried to find out if any key in console.vv file causes zoom hot key labels to disappear.

But if I connect using minimalistic `console.vv` file:

[virt-viewer] 
type=spice 
host=localhost 
port=5900

hot key labels disappear.

If I connect using cmd-line:

remote-viewer spice://localhost:5900

zoom hot key labels are on the place.

Comment 13 Uri Lublin 2020-10-28 17:44:19 UTC
The behavior reported by this bug is by design.
Any hotkey that is not mentioned is being cleared.
A user that wants to keep default hotkeys must mention them
specifically in the vv-file/command-line.

Currently it's not possible for zoom hotkeys.

I think there are several options to fix this bug:
1. Not clear zoom hotkeys.
   No code changes those hotkeys anyway.
   The drawback is that it makes zoom hotkeys special (but they already are).
   Also, a user can not disable these hotkeys.

2. Not clear hotkeys at all, just update the hotkeys that are mentioned.
   The drawback is that it changes the behavior as it was for years.
   Also, a user can not disable a hotkey (we can add a special keyword for that)

3. Add code to enable changing zoom hotkeys.
   This means that those zoom hotkeys must always be set in the vv-file.

4. Not clear hotkeys if the vv-file does not change any hotkey.
   This only solves a simple case such as in comment #12, so not
   a real solution.


I'm going to start with option 1.

Comment 14 Radek Duda 2020-10-29 09:38:22 UTC
(In reply to Uri Lublin from comment #13)
> The behavior reported by this bug is by design.
> Any hotkey that is not mentioned is being cleared.
With exception of 'Quit' - 'Shift+Ctrl+Q'

> A user that wants to keep default hotkeys must mention them
> specifically in the vv-file/command-line.
> 
> Currently it's not possible for zoom hotkeys.
> 
> I think there are several options to fix this bug:
> 1. Not clear zoom hotkeys.
>    No code changes those hotkeys anyway.
>    The drawback is that it makes zoom hotkeys special (but they already are).
>    Also, a user can not disable these hotkeys.
> 
> 2. Not clear hotkeys at all, just update the hotkeys that are mentioned.
>    The drawback is that it changes the behavior as it was for years.
>    Also, a user can not disable a hotkey (we can add a special keyword for
> that)
> 
> 3. Add code to enable changing zoom hotkeys.
>    This means that those zoom hotkeys must always be set in the vv-file.
> 
> 4. Not clear hotkeys if the vv-file does not change any hotkey.
>    This only solves a simple case such as in comment #12, so not
>    a real solution.
> 
> 
> I'm going to start with option 1.

I am not sure if you understand the bug. Zoom hot keys are working whether I connect with vv-file or not. If I press Ctrl++/Ctrl+-/Ctrl+0 it works ok in both cases.
Only hotkey labels in application menu are missing if I connect using vv-file or pass hotkey cmd-line option (as in comment #9).

Comment 15 Jakub Janků 2020-12-02 20:26:37 UTC
> If I press Ctrl++/Ctrl+-/Ctrl+0 it works ok in both cases.

Hi Radek, are you using the +- keys on the numpad? If so, does the zoom functionality still work when pressing the regular +- keys?

Comment 16 Radek Duda 2020-12-03 11:10:02 UTC
If I connect using simplified vv-file:
[virt-viewer] 
type=spice
host=localhost 
port=5900

only +/-/0 keys from numpad works (and no hot key labels in remote-viewer menu).

If I connect like this:
remote-viewer spice://localhost:5900
both regular and numpad keys are working to zoom (and hot key labels are present in remote-viewer menu)

Comment 17 Jakub Janků 2020-12-03 14:23:38 UTC
(In reply to Radek Duda from comment #16)
> If I connect using simplified vv-file:
> [virt-viewer] 
> type=spice
> host=localhost 
> port=5900
> 
> only +/-/0 keys from numpad works (and no hot key labels in remote-viewer
> menu).
> 
> If I connect like this:
> remote-viewer spice://localhost:5900
> both regular and numpad keys are working to zoom (and hot key labels are
> present in remote-viewer menu)

Thanks for the info.

I've just submitted https://gitlab.com/virt-viewer/virt-viewer/-/merge_requests/45
With this change, the zoom hotkeys should only work when the label is visible in the menu. Could you please test it?

Concerning the labels: if you use vv file or specify any hotkey using the --hotkeys option, the zoom hotkeys should be disabled; the user cannot set a different zoom hotkey.
Now I think that this is a bit weird and could be improved, but this bug itself should imo be fixed by unifying the behaviour of the normal and the keypad zoom hotkeys.

Comment 18 Radek Duda 2020-12-04 12:36:51 UTC
Hi Jakub,
this is not a bug report of working zoom hotkeys from numpad when they should not work. This is the bug report about missing zoom hotkey labels and consequently non working zoom hot keys when connected via vv-file (or passing any non-relevant --hotkey option).
From the user perspective, I don't see a point why zoom hotkeys are not working when connected via vv-file (example of which is in comment #16).
I think we should open a RFE: "unify the behaviour of normal and keypad zoom hotkeys" for your patch https://gitlab.com/virt-viewer/virt-viewer/-/merge_requests/45

Comment 19 Jakub Janků 2020-12-04 13:55:29 UTC
Hi,

I'm not sure whether the behaviour with vv-file and hotkeys is described somewhere, so I'll focus on the --hotkeys option:

In the manual for virt-viewer and the --hotkeys option, you find the following:
"Note that hotkeys for which no binding is given are disabled. Although the hotkeys specified here are handled by the client, it is still possible to send these key combinations to the guest via a menu item."
The fact, that these hotkeys are disabled, is manifested by hiding the key binding labels in the menu.

The confusion comes from the situation that keypad hotkeys still work, when they should be disabled and the label is missing, I think. So to me, this is directly related to this bug.

> This is the bug report about missing zoom hotkey labels and consequently non working zoom hot keys when connected via vv-file (or passing any non-relevant --hotkey option).
> From the user perspective, I don't see a point why zoom hotkeys are not working when connected via vv-file

I agree with you on that. But then I don't see why this bug is marked as regression. The labels disappear by design and the manual explicitly says what happens if you use the --hotkey option.

Some suggestions to change this bug report:
1. "RFE: allow the user to customize zoom hotkeys"
2. "RFE: don't disable all hotkeys when no hotkey is customized in the vv file"

What do you think about that?

> I think we should open a RFE: "unify the behaviour of normal and keypad zoom hotkeys" for your patch https://gitlab.com/virt-viewer/virt-viewer/-/merge_requests/45

It was approved and merged by Daniel Berrangé today, so that's probably unnecessary.

Comment 20 Radek Duda 2020-12-08 16:23:20 UTC
Hi Jakub,
I think you do not see full impact of this bug and your patch. I understand it is important to unify behaviour from numpad and normal hotkeys, but by your patch there will be no hotkey possible for zooming whatsoever for connections to VMs from Red Hat Virtualization Mangader since there is always some hotkey option sent to VM (or something like that), even thou no hotkey is specified in vv-file and thus zoom hotkeys are removed. You can not manually pass zoom hotkey option since only toggle-fullscreen, release-cursor, secure-attention, smartcard-insert and smartcard-remove are possible keys to pass (virt-viewer man pages). Btw I wonder 'Quit' hotkey is preserved (Shift+Ctrl+Q) ... why?

Now when I see keypad zoom hotkey behaviour was different from normal zoom hotkey I think the most convenient would be number 1. solution in Uri's list (comment #13). What do you think Uri?

Comment 21 Uri Lublin 2020-12-10 10:59:06 UTC
(In reply to Radek Duda from comment #20)
> Hi Jakub,
> I think you do not see full impact of this bug and your patch. I understand
> it is important to unify behaviour from numpad and normal hotkeys, but by
> your patch there will be no hotkey possible for zooming whatsoever for
> connections to VMs from Red Hat Virtualization Mangader since there is
> always some hotkey option sent to VM (or something like that), even thou no
> hotkey is specified in vv-file and thus zoom hotkeys are removed. You can
> not manually pass zoom hotkey option since only toggle-fullscreen,
> release-cursor, secure-attention, smartcard-insert and smartcard-remove are
> possible keys to pass (virt-viewer man pages). Btw I wonder 'Quit' hotkey is
> preserved (Shift+Ctrl+Q) ... why?
> 
> Now when I see keypad zoom hotkey behaviour was different from normal zoom
> hotkey I think the most convenient would be number 1. solution in Uri's list
> (comment #13). What do you think Uri?

Jakub's patch makes zoom hotkeys consistent for both keyboard and numpad.
Also, it makes the zoom labels consistent with zoom hotkeys being enabled/disabled.
So it fixes this specific bug about mismatch between hotkeys and labels.


I did implement option number 1 above, but as mentioned the drawback is that users
can't disable it.
https://gitlab.com/uril/virt-viewer/-/commit/9239c3ebe77c3b0cf8e2298c63addaeaa65e1a97

I also implemented option number 3, which makes zoom hotkeys similar to other hotkeys.
https://gitlab.com/uril/virt-viewer/-/commits/hotkeys_enable_changing_zoom

Comment 22 Jakub Janků 2020-12-21 10:28:26 UTC
I'm quite against the option 1, not being able to disable it seems like a major drawback. I rarely use the virt-viewer zoom options, on the other hand Ctrl++/Ctrl+- are quite universal, they can be useful in many applications in the guest (browser, file explorer, image viewer etc.).

Option 3 seems much more reasonable to me, it gives the user more control.

Comment 24 Uri Lublin 2021-01-11 19:57:06 UTC
(In reply to Uri Lublin from comment #23)
And https://gitlab.com/virt-viewer/virt-viewer/-/merge_requests/50

Comment 27 zhoujunqin 2021-01-13 09:38:02 UTC
I can reproduce this issue with 
virt-viewer-9.0-5.el8.x86_64

Then try to verify this bug with latest build:
virt-viewer-9.0-7.el8.x86_64

Steps:

1. Man page of virt-viewer and remote-viewer have updated, finding "zoom-in, zoom-out, zoom-reset" are added to the valid hotkeys actions.

$ man virt-viewer 
...
       -H HOTKEYS, --hotkeys HOTKEYS
           Set global hotkey bindings. By default, keyboard shortcuts only work when the guest display widget does
           not have focus.  Any actions specified in HOTKEYS will be effective even when the guest display widget
           has input focus. The format for HOTKEYS is <action1>=<key1>[+<key2>][,<action2>=<key3>[+<key4>]].  Key-
           names are case-insensitive. Valid actions are: toggle-fullscreen, release-cursor, zoom-in, zoom-out,
           zoom-reset, secure-attention, smartcard-insert and smartcard-remove.
...


$ man remote-viewer
...
       -H HOTKEYS, --hotkeys HOTKEYS
           Set global hotkey bindings. By default, keyboard shortcuts only work when the guest display widget does
           not have focus.  Any actions specified in HOTKEYS will be effective even when the guest display widget
           has input focus. The format for HOTKEYS is <action1>=<key1>[+<key2>][,<action2>=<key3>[+<key4>]].  Key-
           names are case-insensitive. Valid actions are: toggle-fullscreen, release-cursor, zoom-in, zoom-out,
           zoom-reset, secure-attention, smartcard-insert and  smartcard-remove. 
...

       "zoom-in" (hotkey string)
           Key binding for zooming in and enlarging client window size. (see HOTKEY for description of expected
           string)

       "zoom-out" (hotkey string)
           Key binding for zooming out and reducing client window size. (see HOTKEY for description of expected
           string)

       "zoom-reset" (hotkey string)
           Key binding for reseting zoom and client window size. (see HOTKEY for description of expected string)

...


2. Test hotkeys

2.1 Test with local libvirt VMs (established using virt-manager)

2.1.1 Prepare a running guest.
2.1.2 Then connect the guest by virt-viewer or remote-viewer with setting hotkeys.

$ virt-viewer -c qemu:///system spice --hotkeys=zoom-in=shift+f2,zoom-out=shift+f3,zoom-reset=shift+f4
or
$ remote-viewer spice://127.0.0.1:5900 --hotkeys=z

Then click: View->Zoom, I can find hot key labels:
'Zoom In'  Shift+F2
'Zoom Out' Shift+F3
'Normal Size' Shift+F4

And such above hotkeys can be seen under 'Send Key' toolbar - Shift+F4/Shift+F3/Shift+F2


Test result: All the hotkeys Shift+F4/Shift+F3/Shift+F2 work well.

2.1.3 Re-connect to the guest by virt-viewer or remote-viewer without setting hotkeys.
$ virt-viewer -c qemu:///system spice
or
$ remote-viewer spice://127.0.0.1:5900


Then click: View->Zoom, I can find hot key labels are as follows:
'Zoom In'  Ctrl++
'Zoom Out' Ctrl+-
'Normal Size' Ctrl+0

Test result: Without setting hotkeys, zoom actions using "normal" hotkeys Ctrl++/Ctrl+- and working well.


2.2 Test with RHV VMs.
Red Hat Virtualization Manager Web Administration
Software Version:4.4.4.6-0.1.el8ev

2.2.1 Download a vm's console.vv file from rhv and open it directly.
$ remote-viewer console.vv

Test result: No zoom hot keys labels displays.

2.2.2 Download a vm's console.vv file from rhv again and add following content to the console.vv file.
zoom-in=shift+f2
zoom-out=shift+f3
zoom-reset=shift+f4

$ cat console.vv 
[virt-viewer]
type=spice
...
# Password is valid for 120 seconds.
delete-this-file=1
fullscreen=0
title=clone-juzhou:%d
toggle-fullscreen=shift+f11
release-cursor=shift+f12
secure-attention=ctrl+alt+end
zoom-in=shift+f2
zoom-out=shift+f3
zoom-reset=shift+f4
tls-port=5903
...

2.2.3 Open the console.vv file by remote-viewer.
$ remote-viewer console.vv 

Then click: View->Zoom, I can find hot key labels:
'Zoom In'  Shift+F2
'Zoom Out' Shift+F3
'Normal Size' Shift+F4

And such above hotkeys can be seen under 'Send Key' toolbar - Shift+F4/Shift+F3/Shift+F2


Test result: All the hotkeys Shift+F4/Shift+F3/Shift+F2 work well.

I move this bug from ON_QA to VERIFIED Status based on above testing, thanks.

Comment 29 errata-xmlrpc 2021-05-18 15:53:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (virt-viewer bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:1876


Note You need to log in before you can comment on or make changes to this bug.