mpv icon indicating copy to clipboard operation
mpv copied to clipboard

input.conf: bind `Ctrl+WHEEL_UP/DOWN` to `video-zoom`

Open na-na-hi opened this issue 1 year ago • 3 comments

There are good reasons to bind Ctrl+WHEEL_UP/WHEEL_DOWN to video-zoom:

  • They are ubiquitous and familiar key bindings to represent zooming operations, which are used in all popular web browsers, document viewers, and document editors.
  • Because WHEEL_UP/WHEEL_DOWN are scaled with high-resolution scrolling input devices like touchpads, this allows smooth zooming.
  • This makes "pinch to zoom" with touchpads and touchscreens work out of box on Windows, since by default applications receive these key inputs for pinch gesture.
  • It had been considered to bind these keys to window-scale instead. However, this results in horrible UX as the keybinds work only when the mouse pointer is over the mpv window, and if the window shrinks during this operation, the window below mpv now receives these keybinds, resulting in unwanted zooming for that window, which violates the principle of least surprise.

na-na-hi avatar Feb 18 '24 19:02 na-na-hi

Download the artifacts for this pull request:

Windows

github-actions[bot] avatar Feb 18 '24 19:02 github-actions[bot]

These bindings make sense. You could also document them in DOCS/man/mpv.rst.

guidocella avatar Feb 18 '24 19:02 guidocella

It would be more consistent to document these at the end of the section since the other mouse bindings are grouped there even though they all share actions with keyboard bindings.

guidocella avatar Feb 18 '24 19:02 guidocella