Togglie zoom shortcut

I try to set up desktop zoom like I managed to do in gnome.
Especially I need one shortcut to toggle magnifier.
how to do that?

I have done so:

Click on “Configure”:

Chose an “action” you want to create a shortcut for:

Select “Custom”, then click on “None”, then type the shortcut you want to use:

Probably, all “keys-combination” are already in use, so you will be warned that it is already in use (and, what for). – If you think it is Ok to lose its default use, click “Reassign”. – If not, just “Cancel” and try another combination.

This is just an example. – I have used “CTRL+A”, just to take a screenshot – and “Canceled” it.

I had already choosen other 2 shortcuts for “Zoom In” and “Zoom Out”, so I don’t need a “Zoom to Actual Size”.

And, yes, I have changed “Zoom Factor” from 1,2x to 3.0x.

thank you for your response.
Unfortunatly its not 100% what I’d like to achive. I need one key combo to zoom-in and out (when I press this combo once, it zooms in to some scale, and when I press it again it returns to normal scale)

You could try making a shell script that calls

qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut "view_zoom_in"

as many times as zoom you need, then keep track the zoom status on some file (e.g by saving 1 when the zoom is enabled and 0 otherwise), next time you call your script check that file and run

qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut "view_actual_size"

to return to normal.

Then you bind this script to a custom shortcut

that works, thank you.
I feel a bet stupid doing this but it works :smile:

#!/bin/bash
FILEPATH="$HOME/.cache/kde_zoom"

if [ -f $FILEPATH ]; then
    ZOOM=$(cat $FILEPATH)
else
    ZOOM=0
fi

if [ $ZOOM -eq 1 ]; then
    qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut "view_actual_size"
    echo 0 > $FILEPATH
else
    qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.invokeShortcut "view_zoom_in"
    echo 1 > $FILEPATH
fi