Bug 483193

Summary: feature request: allow whole desktop zoom dynamically with mouse wheel scroll and configure keyboard key to hold
Product: [Plasma] kwin Reporter: Edmund Laugasson <edmund.laugasson>
Component: effects-variousAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: wishlist CC: fanzhuyifan, nate
Priority: NOR Keywords: qt6
Version: 6.0.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=171295
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Edmund Laugasson 2024-03-11 03:50:48 UTC
SUMMARY
Currently impossible to zoom dynamically with mouse. Only keyboard shortcuts are for desktop zooming.

STEPS TO REPRODUCE
1. by default desktop zoom is enabled, if not - please enable
2. only keyboard shortcut keys are available, no mouse can be defined
3. cannot use mouse with certain keyboard key to dynamically zoom the desktop

OBSERVED RESULT
cannot use mouse with certain keyboard key to dynamically zoom the whole desktop

EXPECTED RESULT
can be used mouse with certain keyboard key to dynamically zoom the whole desktop

SOFTWARE/OS VERSIONS
Linux: Endeavour OS
KDE Plasma:  6.0.1
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION
I got it working:
installing
yay -Syyuu xbindkeys --needed --noconfirm && yay -Scc --noconfirm

loading default conf
xbindkeys --defaults > $HOME/.xbindkeysrc
(then uncommenting all existing values)

checking key button pressing values
xbindkeys --multikey

into file $HOME/.xbindkeysrc can be written:
qdbus6 is in KDE 6 but earlier has qdbus
# Zoom in
"qdbus6 org.kde.kglobalaccel /component/kwin invokeShortcut "view_zoom_in""
  m:0x18 + c:133 + b:4 # ALT-key
# m:0x50 + c:133 + b:4 # Super-key
# m:0x11 + c:133 + b:4 # SHIFT-key
# m:0x10 + c:133 + b:4 # x-key
# m:0x90 + c:133 + b:4 # ALTGr-key
# m:0x14 + c:133 + b:4 # CTRL-key

# Zoom out
"qdbus6 org.kde.kglobalaccel /component/kwin invokeShortcut "view_zoom_out""
  m:0x18 + c:133 + b:5 # ALT-key
# m:0x50 + c:133 + b:5 # Super-key
# m:0x11 + c:133 + b:5 # SHIFT-key
# m:0x10 + c:133 + b:5 # x-key
# m:0x90 + c:133 + b:5 # ALTGr-key
# m:0x14 + c:133 + b:5 # CTRL-key

# comment existing lines and paste above and uncomment desired key
# then restart app:
# killall xbindkeys && xbindkeys &
# and you can use new defined keys with mouse

Proposal:
in KDE Settings there in GUI app could be an option to zoom dynamically with mouse wheel scroll by holding down additional keyboard button (key). Then there could be pull-down menu to choose what keyboard key could be used together with mouse wheel scroll. Currently only keyboard keys can be defined but mouse cannot be used to configure desktop zoom. But dynamic zoom is usable with mouse wheel scroll. E.g. CTRL+mouse wheel scroll will zoom in/out in apps (web browser, office suite, terminal, text editor, etc).
This should work with both kwin_x11 and kwin_wayland.
Comment 1 Nate Graham 2024-03-11 20:29:17 UTC
We have this already: hold down the Meta/Super/Windows and Ctrl keys and then scroll. The keys are also configurable. All this can be found and done on System Settings' Shortcuts page.