How do I toggle between the most recent app and Desktop while keeping them in the same space? I am aware that I can hide an app with ⌘+H or minimise it with ⌘+M. However my use case involves frequent toggling between hiding the app (to view the desktop) and then viewing that app again. For this I need to manually click on the app's icon in the dock.
So is there a way I can view the most recent app that I have hidden or minimised using only the keyboard?
There is keyboard shortcut for viewing Desktop:
System Preferences &gt; Mission Control &gt; Keyboard and Mouse Shortcuts &gt; Show Desktop
This should be F11 by default but alternative key can be chosen from options provided in drop-down menu.
Pressing key set shows desktop, pressing it again takes you back to the window you were.
Addressing border issue: in addition to Solar Mike solution to display desktop without borders and in case there are more than one app window open 'hide all except active and minimize last' approach can be taken.
There is keyboard shortcut for hiding apps except active: ⌥+⌘+H
After that, while keeping ⌥+⌘ down press M (minimizes active app, it's enough to minimize with only ⌘+M too).
Desktop is now displayed. All app windows are hidden except last which is minimized (sadly there is not possible to hide all except active and after that hide active).
To restore last (minimized) window use ⌘+TAB to navigate to app, while holding ⌘ press ⌥ and after that release ⌘ first and ⌥ after - this opens minimized app window.
There are caveats if on other space(s) the same app is also open.