A KWin script implementing a feature of i3wm: Automatic back-and-forth when switching to the current workspace.
Run
kpackagetool6 --type KWin/Script --install package/
then go to "KWin Scripts" settings and enable the "Desktop auto back-and-forth" script.
Go to "Shortcuts" settings, search for "AutoBackAndForth" (under KWin) and choose your shortcuts.
Activate one of the shortcuts to switch to a different virtual desktop, and activate it again to switch to the previously used virtual desktop.