Change shortcut for zoom to 100%

When I am using the mouse in the lighttable, a shortcut for zooming quickly to 100% (for checking focus) is to press the mouse wheel. I’d prefer to set a different shortcut, e.g. hold down shift and press left mouse button. Where can I change this?

W and you will have full screen while key is pressed.
Ctrl-w to toggle full screen.

For focus there’s Focus peaking mode the shortcut, I think is ctrl-shift-f to toggle it.
I hope it helps

That W shortcut is a useful one, thanks, I may well use it quite a lot! What I really mean is that, once you are in full screen mode (e.g. via the ‘w’ or ‘f’ shortcut), I then want to zoom to 100% where the cursor is positioned (to check focus). You can do this by pressing on the mousewheel button, but personally I don’t like pressing on something that also rotates… I’d rather the shortcut was something like “hold down shift and press left mouse button”. In the shortcuts settings I managed to assign a keyboard shortcut to zoom to 100% but it doesn’t seem to be linked to the cursor position so it isn’t particularly helpful. I couldn’t seem to set a shortcut that involves a mouse button press.

That is the default to extend a selection which I know is not an issue in “culling” mode of LT which I suspect that you are talking about but it might be one that you might want to consider a different mapping just in case this cannot be mapped…I haven’t tried but as good practice I don’t think I would map it that way anyway

Just from a semantics point of view, a “shortcut” is a way to issue a command without having to go to the location where that command normally is activated (for example clicking on a button or interacting with a widget within a module). Direct mouse interactions are therefore not “shortcuts”. There is at the moment no framework in dt to make them configurable, either assigning different buttons or “modifiers” (shift/ctrl/alt). All those combinations are hardcoded. Sorry…

Is there any reason why a keyboard shortcut to zoom to 100% can’t be linked to the current cursor position? I.e. pressing the shortcut zooms in centred on the cursor (even without a mouse connected there would still be a cursor visible). That would allow you to position the cursor e.g. on the subject’s eyes and then just tap the assigned key.

Apart from developer time and interest? Probably not.

The current shortcut simply links to the zoom dropdown overlayed on the “navigator” (the preview image in the top left). So the code change you are suggesting would have to check, whenever the requested zoom level changes, that the mouse is over the central screen area instead of over the navigator. Doesn’t sound hard.

Can we think of any unintended consequences this might have? Presumably all current users of the shortcut (who just expect the center to stay in the center) will have to adjust their expectations. From experience, this is likely to lead to some complaints, but would any of them be “reasonable”? (given that moving the mouse to a sidepanel should restore the current behavior). Developer interest can wane if they expect too much pushback, endless discussions or suggestions for additional features/complexity or configurability. What really would help is if this were a feature that a developer wanted themselves (and just hadn’t thought of yet!)

If you are a developer yourself, you could have a look at the function _zoom_changed in navigation.c. It doesn’t receive the current mouse position, so you’d have to use something like gdk_window_get_device_position (there’s a few examples in the code).

2 Likes