[PATCH] docs/system/keys: fix incorrect reset scaling key binding

Nir Lichtman posted 1 patch 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250815090025.GA1464436@lichtman.org
docs/system/keys.rst.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] docs/system/keys: fix incorrect reset scaling key binding
Posted by Nir Lichtman 3 months ago
Fix incorrect key binding for resetting the graphical frontends scaling

Signed-off-by: Nir Lichtman <nir@lichtman.org>
---
 docs/system/keys.rst.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/system/keys.rst.inc b/docs/system/keys.rst.inc
index c28ae1a..3b5307b 100644
--- a/docs/system/keys.rst.inc
+++ b/docs/system/keys.rst.inc
@@ -21,7 +21,7 @@ while ``-display sdl,grab-mod=rctrl`` changes it to the right :kbd:`Ctrl` key.
   * - :kbd:`Ctrl+Alt+-`
     - Shrink the screen
 
-  * - :kbd:`Ctrl+Alt+u`
+  * - :kbd:`Ctrl+Alt+0`
     - Restore the screen's un-scaled dimensions
 
   * - :kbd:`Ctrl+Alt+n`
-- 
2.39.5
Re: [PATCH] docs/system/keys: fix incorrect reset scaling key binding
Posted by Thomas Huth 2 months ago
On 15/08/2025 11.00, Nir Lichtman wrote:
> Fix incorrect key binding for resetting the graphical frontends scaling
> 
> Signed-off-by: Nir Lichtman <nir@lichtman.org>
> ---
>   docs/system/keys.rst.inc | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/docs/system/keys.rst.inc b/docs/system/keys.rst.inc
> index c28ae1a..3b5307b 100644
> --- a/docs/system/keys.rst.inc
> +++ b/docs/system/keys.rst.inc
> @@ -21,7 +21,7 @@ while ``-display sdl,grab-mod=rctrl`` changes it to the right :kbd:`Ctrl` key.
>     * - :kbd:`Ctrl+Alt+-`
>       - Shrink the screen
>   
> -  * - :kbd:`Ctrl+Alt+u`
> +  * - :kbd:`Ctrl+Alt+0`
>       - Restore the screen's un-scaled dimensions

  Hi,

this unfortunately seems to depend on the graphical front-end: For "-display 
gtk", it's ctrl-alt-0 indeed, but for "-display sdl", it's ctrl-alt-u instead.

Should we unify them? If so, which is the better key combination?

  Thomas
Re: [PATCH] docs/system/keys: fix incorrect reset scaling key binding
Posted by Gerd Hoffmann 2 months ago
On Tue, Sep 09, 2025 at 11:15:54AM +0200, Thomas Huth wrote:
> On 15/08/2025 11.00, Nir Lichtman wrote:
> > Fix incorrect key binding for resetting the graphical frontends scaling
> > 
> > Signed-off-by: Nir Lichtman <nir@lichtman.org>
> > ---
> >   docs/system/keys.rst.inc | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/docs/system/keys.rst.inc b/docs/system/keys.rst.inc
> > index c28ae1a..3b5307b 100644
> > --- a/docs/system/keys.rst.inc
> > +++ b/docs/system/keys.rst.inc
> > @@ -21,7 +21,7 @@ while ``-display sdl,grab-mod=rctrl`` changes it to the right :kbd:`Ctrl` key.
> >     * - :kbd:`Ctrl+Alt+-`
> >       - Shrink the screen
> > -  * - :kbd:`Ctrl+Alt+u`
> > +  * - :kbd:`Ctrl+Alt+0`
> >       - Restore the screen's un-scaled dimensions
> 
>  Hi,
> 
> this unfortunately seems to depend on the graphical front-end: For "-display
> gtk", it's ctrl-alt-0 indeed, but for "-display sdl", it's ctrl-alt-u
> instead.
> 
> Should we unify them? If so, which is the better key combination?

Established convention in various apps is '+' for zoom in, '-' for zoom
out, and '0' for reset to 100% (each combined with the hotkey
modifier(s)).  So when changing hotkeys we should follow that I think,
i.e. switch SDL to Ctrl+Alt+0.

my two cents,
  Gerd
Re: [PATCH] docs/system/keys: fix incorrect reset scaling key binding
Posted by Nir Lichtman 2 months ago
On Wed, Sep 10, 2025 at 10:38:43AM +0200, Gerd Hoffmann wrote:
> On Tue, Sep 09, 2025 at 11:15:54AM +0200, Thomas Huth wrote:
> > On 15/08/2025 11.00, Nir Lichtman wrote:
> > > Fix incorrect key binding for resetting the graphical frontends scaling
> > > 
> > > Signed-off-by: Nir Lichtman <nir@lichtman.org>
> > > ---
> > >   docs/system/keys.rst.inc | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/docs/system/keys.rst.inc b/docs/system/keys.rst.inc
> > > index c28ae1a..3b5307b 100644
> > > --- a/docs/system/keys.rst.inc
> > > +++ b/docs/system/keys.rst.inc
> > > @@ -21,7 +21,7 @@ while ``-display sdl,grab-mod=rctrl`` changes it to the right :kbd:`Ctrl` key.
> > >     * - :kbd:`Ctrl+Alt+-`
> > >       - Shrink the screen
> > > -  * - :kbd:`Ctrl+Alt+u`
> > > +  * - :kbd:`Ctrl+Alt+0`
> > >       - Restore the screen's un-scaled dimensions
> > 
> >  Hi,
> > 
> > this unfortunately seems to depend on the graphical front-end: For "-display
> > gtk", it's ctrl-alt-0 indeed, but for "-display sdl", it's ctrl-alt-u
> > instead.
> > 
> > Should we unify them? If so, which is the better key combination?
> 
> Established convention in various apps is '+' for zoom in, '-' for zoom
> out, and '0' for reset to 100% (each combined with the hotkey
> modifier(s)).  So when changing hotkeys we should follow that I think,
> i.e. switch SDL to Ctrl+Alt+0.

I'll send a patch fixing SDL to use CTRL+ALT+0

Nir
Re: [PATCH] docs/system/keys: fix incorrect reset scaling key binding
Posted by Thomas Huth 1 month, 1 week ago
On 10/09/2025 12.23, Nir Lichtman wrote:
> On Wed, Sep 10, 2025 at 10:38:43AM +0200, Gerd Hoffmann wrote:
>> On Tue, Sep 09, 2025 at 11:15:54AM +0200, Thomas Huth wrote:
>>> On 15/08/2025 11.00, Nir Lichtman wrote:
>>>> Fix incorrect key binding for resetting the graphical frontends scaling
>>>>
>>>> Signed-off-by: Nir Lichtman <nir@lichtman.org>
>>>> ---
>>>>    docs/system/keys.rst.inc | 2 +-
>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/docs/system/keys.rst.inc b/docs/system/keys.rst.inc
>>>> index c28ae1a..3b5307b 100644
>>>> --- a/docs/system/keys.rst.inc
>>>> +++ b/docs/system/keys.rst.inc
>>>> @@ -21,7 +21,7 @@ while ``-display sdl,grab-mod=rctrl`` changes it to the right :kbd:`Ctrl` key.
>>>>      * - :kbd:`Ctrl+Alt+-`
>>>>        - Shrink the screen
>>>> -  * - :kbd:`Ctrl+Alt+u`
>>>> +  * - :kbd:`Ctrl+Alt+0`
>>>>        - Restore the screen's un-scaled dimensions
>>>
>>>   Hi,
>>>
>>> this unfortunately seems to depend on the graphical front-end: For "-display
>>> gtk", it's ctrl-alt-0 indeed, but for "-display sdl", it's ctrl-alt-u
>>> instead.
>>>
>>> Should we unify them? If so, which is the better key combination?
>>
>> Established convention in various apps is '+' for zoom in, '-' for zoom
>> out, and '0' for reset to 100% (each combined with the hotkey
>> modifier(s)).  So when changing hotkeys we should follow that I think,
>> i.e. switch SDL to Ctrl+Alt+0.
> 
> I'll send a patch fixing SDL to use CTRL+ALT+0

Now that the patch for the SDL backend got merged:

Reviewed-by: Thomas Huth <thuth@redhat.com>
Re: [PATCH] docs/system/keys: fix incorrect reset scaling key binding
Posted by Michael Tokarev 1 month ago
On 10/7/25 14:47, Thomas Huth wrote:
> On 10/09/2025 12.23, Nir Lichtman wrote:
>> On Wed, Sep 10, 2025 at 10:38:43AM +0200, Gerd Hoffmann wrote:
>>> On Tue, Sep 09, 2025 at 11:15:54AM +0200, Thomas Huth wrote:
>>>> On 15/08/2025 11.00, Nir Lichtman wrote:
>>>>> Fix incorrect key binding for resetting the graphical frontends 
>>>>> scaling
>>>>>
>>>>> Signed-off-by: Nir Lichtman <nir@lichtman.org>
>>>>> ---
>>>>>    docs/system/keys.rst.inc | 2 +-
>>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/docs/system/keys.rst.inc b/docs/system/keys.rst.inc
>>>>> index c28ae1a..3b5307b 100644
>>>>> --- a/docs/system/keys.rst.inc
>>>>> +++ b/docs/system/keys.rst.inc
>>>>> @@ -21,7 +21,7 @@ while ``-display sdl,grab-mod=rctrl`` changes it 
>>>>> to the right :kbd:`Ctrl` key.
>>>>>      * - :kbd:`Ctrl+Alt+-`
>>>>>        - Shrink the screen
>>>>> -  * - :kbd:`Ctrl+Alt+u`
>>>>> +  * - :kbd:`Ctrl+Alt+0`
>>>>>        - Restore the screen's un-scaled dimensions


>> I'll send a patch fixing SDL to use CTRL+ALT+0
> 
> Now that the patch for the SDL backend got merged:

Fixes: 15421f7113 "ui/sdl2: fix reset scaling binding to be consistent 
with gtk"
(it'd be nice to merge the two changes together, but ok)
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>

And applied to the trivial-patches tree.

Thanks,

/mjt

Re: [PATCH] docs/system/keys: fix incorrect reset scaling key binding
Posted by Nir Lichtman 1 month, 1 week ago
On Wed, Sep 10, 2025 at 10:23:52AM +0000, Nir Lichtman wrote:
> On Wed, Sep 10, 2025 at 10:38:43AM +0200, Gerd Hoffmann wrote:
> > On Tue, Sep 09, 2025 at 11:15:54AM +0200, Thomas Huth wrote:
> > > On 15/08/2025 11.00, Nir Lichtman wrote:
> > > > Fix incorrect key binding for resetting the graphical frontends scaling
> > > > 
> > > > Signed-off-by: Nir Lichtman <nir@lichtman.org>
> > > > ---
> > > >   docs/system/keys.rst.inc | 2 +-
> > > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/docs/system/keys.rst.inc b/docs/system/keys.rst.inc
> > > > index c28ae1a..3b5307b 100644
> > > > --- a/docs/system/keys.rst.inc
> > > > +++ b/docs/system/keys.rst.inc
> > > > @@ -21,7 +21,7 @@ while ``-display sdl,grab-mod=rctrl`` changes it to the right :kbd:`Ctrl` key.
> > > >     * - :kbd:`Ctrl+Alt+-`
> > > >       - Shrink the screen
> > > > -  * - :kbd:`Ctrl+Alt+u`
> > > > +  * - :kbd:`Ctrl+Alt+0`
> > > >       - Restore the screen's un-scaled dimensions
> > > 
> > >  Hi,
> > > 
> > > this unfortunately seems to depend on the graphical front-end: For "-display
> > > gtk", it's ctrl-alt-0 indeed, but for "-display sdl", it's ctrl-alt-u
> > > instead.
> > > 
> > > Should we unify them? If so, which is the better key combination?
> > 
> > Established convention in various apps is '+' for zoom in, '-' for zoom
> > out, and '0' for reset to 100% (each combined with the hotkey
> > modifier(s)).  So when changing hotkeys we should follow that I think,
> > i.e. switch SDL to Ctrl+Alt+0.
> 
> I'll send a patch fixing SDL to use CTRL+ALT+0
> 
> Nir

Hi,

Looks like the SDL patch I sent was merged into main,
reminder regarding this patch which fixes the documentation.

Thanks,
Nir