And even with that, it still doesn't recover zoom position. 3 works but ` doesn't. Maybe I'm doing something wrong. The equivalent menu option "Previous zoom" works, thought.
Most likely your keyboard just issues some other keycode on pressing this key. Again, it's only you who can investigate that and propose a fix.
How can I check this?
Actually a switch key would work better. Like push 3 for zoom in, push 3 again to zoom back. I don't like the idea of keeping Q stroked.
That wouldn't work. We have much more zoom keys - 1, 2, 3, 4 etc all have their functions. Not everyone zooms in with the intention to zoom back again. If you want to zoom to selection _again_ and instead it zooms you out to some previous zoom, it wouldn't be good usability.
Maybe I didn't explain it correctly... I don't intend this to replace the zoom to selection button. Rather this is a new mode which would zoom in when pressed and zoom out when pressed again. The zoom in level would be detrmined by the largest zoom factor used on the last action, and the zoom out level would be determined by the smallest zoom factor used for a determined period of time (to avoid setting a zoom out level accidentally while zooming out with the wheel/zoom tool).
The workflow would be like this: 1. You have an object and zoom in and do some fine tuning on the nodes. The zoom in factor is determined (and the zoom position). 2. You zoom back and stare at the changes for a while. In this short period of time the zoom out factor gets determined. 3. Press the key and you go back to zoom in state and do some more tweakings. 4. Press key again and go back to zoom out state. Stare at the editing and go back to zoom in if you wish.
Something like this. Would be too cumbersome?
So, a single key which travels back through your history of zooms is a much better solution.
That's kinda what I'm looking for... implementation details aside.
Regards.
PS: I'm resending this to inkscape-devel. Sorry bulia.