<div dir="ltr">Hi.<br><br>Being a visually impaired coder, a 'killer feature' for me is the ability to zoom the desktop in/out using the mouse wheel together with a modifier key such as <shift>, <ctrl> or similar. This functionality is supported by the 'Enhanced Desktop Zoom' feature in compiz-based desktops and by OSX out-of-the box (not in Windows however...).<br><br>Currently this is not supported in a gnome-shell/wayland environment such as Ubuntu 17.10 so I thought I might take a stab at implementing this. I am however completely new to the whole gnome ecosystem so I have spent a couple of days trying to read-up on relevant concepts such as Wayland, Clutter, Mutter, Gjs, gnome-shell, etc.<br><br>The main technical problem seems to be how to globally grab the Clutter.EventType.SCROLL events when a modifier key is pressed and I would be thankful for all help and pointers to the best way to accomplish this (if possible).<br><br>My research so far seems to indicate the following:<br><br>1. There is a gnome-shell extension written in Vala by Tobias Quinn (<a href="https://github.com/tobiasquinn/gnome-shell-mousewheel-zoom">https://github.com/tobiasquinn/gnome-shell-mousewheel-zoom</a>) that accomplishes what I want but as I understand it, it requires gnome-shell to run under X and not Wayland.<br>2. It is possible to globally grab key combinations from within a gnome-shell extension using the 'accelerator-activated' signal like this:<br> global.display.connect('accelerator-activated',...<br>(see <a href="https://stackoverflow.com/questions/12325405/gnome-shell-extension-key-binding#42466781">https://stackoverflow.com/questions/12325405/gnome-shell-extension-key-binding#42466781</a> for the source of this)<br>3. I have not succeeded in receiving scroll events when connecting to the 'scroll-event' or 'captured-event' signals on 'high-level' actors such as global.stage or Main.layoutManager.uiGroup. My guess is that the scroll events are routed directly to the actor under the mouse cursor and swallowed by them, thus not propagated upwards in the scene graph.<br>4. The Magnifier included in the gnome-shell uses a number of 'special' techniques to accomplish its task<br>  - to follow the mouse it gets hold of a 'CursorTracker' that Mutter provides. (in src/meta/meta-cursor-tracker.h) but the CursorTracker only seems to care about pointer position and not about scroll events.<br>  - to register global listeners for 'focus change' and 'caret change' it uses the Atspi library but I haven't had the time to try to see if this library also supports a global listener for scroll events.<br><br>The best hypothesis I have come up with so far is to emulate the behaviour of the SwitcherPopup and write a gnome-shell extension that:<br> - globally captures a key combination<br> - implement an invisible actor that covers the whole screen and 'pops up' when the key combination above is captured (and destroyed when the keys are released).<br> - use the scroll-events that are received by the invisible actor to change the magnification factor for the magnifier in 'real time'.<br><br>If the above would work, a draw-back would be that I can't just press <shift> and scroll but have to press a valid accelerator combo (e.g. <ctrl>+<shift>+'a' or similar) which would make it less ergonomical and swift.<br><br>So, any ideas about how to accomplish a global grab of mousewheel scroll together with a single modifier key?<br><br>Regards<br>/Anders<br><br></div>