GNOME 3 is not compatible with Compiz, so I cannot use the desktop zoom feature from Compiz. I googled for a long time, and it seems GNOME still does not support desktop zoom -- does it? I am using GNOME 3.2.1
For those who don't mind using keyboard shortcuts instead of the mouse scrollwheel, here they are (tested with Gnome 3.14.2):
- Super+Alt+8 : Toggle zoom enabled/disabled (when enabled, the next two keyboard shortcuts become active)
- Super+Alt++ : Zoom in (increases zoom factor by 1.0)
- Super+Alt+- : Zoom out (decreases zoom factor by 1.0, until it is 1.0)
(Yes, decreasing zoom factor all the way down to 1.0 will look unzoomed, but zoom (and its keyboard shortcuts) remain active.)
To answer my own question...
The Gnome3 has a zoom feature in the accessibility menu. Thanks to @fheub. If you want to use shortcut key, you can edit the shortcut key in the keyboard system settings.
But my point is:
- the zoom feature in accessibility menu is designed for people with vision problem. Has the Gnome developer ever realize everyone may want/need such a feature regardless of the condition of their eyes?
- By setting the shortcut key, it is literally means the the key on your keyboard, not including your mouse. But with Compiz, I can use the mod-key + mouse scroll wheel to zoom in/out. Much more convenient.
Gnome Shell Mousewheel zoom is an extension to provide this functionality, it doesn't seem to be on extensions.gnome.org yet.
I was able to get mousewheel to control zoom in ubuntu 20.04 LTS using xbindkeys and a simple bash script:
#!/usr/bin/env bash # gmagctl - manage gnome magnifier # usage: gmagctl [ zoom-in | zoom-out ] # suggested .xbindkeysrc settings: # "gmagctl zoom-in" # shift + control + b:4 # # "gmagctl zoom-out" # shift + control + b:5 ## preferences # zoom factor increment inc="0.5" # minimum zoom factor (don't set less than 1) min=1 # maximum zoom factor max=7 # dconf paths mstat="/org/gnome/desktop/a11y/applications/screen-magnifier-enabled" mfac="/org/gnome/desktop/a11y/magnifier/mag-factor" # make sure zoom is enabled # start at min if it was off if [[ $(dconf read $mstat) == "false" ]] ; then dconf write $mfac $min dconf write $mstat "true" fi cur=$(dconf read $mfac) if [[ "$1" == "zoom-in" ]] ; then new=$(bc <<< "$cur + $inc") if [[ $(bc <<< "$new <= $max") -ne 0 ]] ; then dconf write $mfac $new fi fi if [[ "$1" == "zoom-out" ]] ; then new=$(bc <<< "$cur - $inc") if [[ $(bc <<< "$new >= $min") -ne 0 ]] ; then dconf write $mfac $new fi fi