Help! Trouble with setting Commands

Moving from Mac to PC there was a Mac shortcut I want to replicate:

When a File Explorer window is open I’d like a keyboard shortcut to get to the desktop.

I have got close by setting up a command in Features/Commands but it opens a new File Explorer window on top of the “Open” File Explorer window (with the Desktop) but not just WITHIN the “Open” file Explorer window.

When I click back the “Open” File Explorer window changes to desktop, so I know I’m moving in the right direction.

Hope someone can help - after so many years on a Mac it’s become a weird essential for my workflow :slight_smile:

DT

Bump?

Maybe you can try win + D to quickly to the desktop.
The key of win is which could call the start menu in windows.

I know this topic is old, but if you’re still looking for a way to accomplish this, you might consider AutoHotkey.

  1. Download + install AutoHotkey v2. This script is written for v2. The one in the link below is for v1 if you prefer that.
  2. Open “AutoHotkey Dash” from the Start Menu
  3. Create a new script
  4. Paste this code snippet into the document
  5. Double-click the created script to start it
  6. If you want it to run at start up:
    a. Press WIN+R
    b. Type shell:startup
    c. Create a shortcut to the script file by right-clicking the script and selecting “Create shortcut”
    d. Move the shortcut into the start up folder.
#Requires AutoHotkey v2.0
#SingleInstance ; https://www.autohotkey.com/docs/v2/lib/_SingleInstance.htm
#WinActivateForce ; https://www.autohotkey.com/docs/v2/lib/_WinActivateForce.htm

#HotIf WinActive("ahk_class CabinetWClass") ; explorer

^+d:: ; Set to CTRL+SHIFT+D, but you can change it to another shortcut
{
for window in ComObject("Shell.Application").Windows
try Fullpath := A_Desktop
if FileExist(Fullpath)
    NavRun(Fullpath)
return
}

#HotIf

; http://msdn.microsoft.com/en-us/library/bb774094
GetActiveExplorer() {
    static objShell := ComObject("Shell.Application")
    WinHWND := WinActive("A")    ; Active window
    for Item in objShell.Windows
        if (Item.HWND = WinHWND)
            return Item        ; Return active window object
    return -1    ; No explorer windows match active window
}

NavRun(Path) {
    if (-1 != objIE := GetActiveExplorer())
        objIE.Navigate(Path)
    else
        Run(Path)
}

directory - AutoHotkey go to certain folder from active folder by ignoring full path - Stack Overflow