DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: request: keyboard shortcut for context menu "Explore here" (open file's folder)  (Read 8,243 times)

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,175
    • Coding Snacks
    • Participated in NANY Challenge Three Times
    • Plugin Coding Medal
Request: add a keyboard shortcut to run the context menu "Explore here" command that opens the selected file's folder in Explorer. I suggest ctrl+o as in Open. The context menu's "Explore here" works on all files including local .url files.

Background:
With AutoHotkey we can achieve this for most files by using FARR's control+C shortcut to copy a file's full path.
But that does not work on local .url files since for them FARR's ctrl+C copies the URL rather than the full path to the local file.
A non perfect workaround sends keys to open the context menu.

Code: ( autohotkey)
;control+o to open folder for selected file in FARR
#IfWinActive, ahk_exe FindAndRunRobot.exe
^o::
ControlGetFocus, cFocus, A
if (cFocus == "TNextGrid1")
{
  clipboard =
  send ^c
  SplitPath, clipboard, , dir
  If InStr( FileExist(dir) , "D")
    Run % dir
  ;workaround for .url files where FARR's ctrl+C return the URL
  ;limitation: the context menu briefly flashes and send keys may fail
  Else If InStr(clipboard, "://")
  {
    send +{AppsKey}
    send e
  }
}
return
#IfWinActive

edit: clarified and added workaround in the AutoHotkey script
« Last Edit: March 16, 2018, 05:18 PM by Nod5 »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
I suppose for your purposes you don't mind if I add a more esoteric hotkey that won't conflict with anything else (the way Ctrl+O would)... So if I make it like Ctrl+Shift+E something silly that would still be ok for your purposes?

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,175
    • Coding Snacks
    • Participated in NANY Challenge Three Times
    • Plugin Coding Medal
I suppose for your purposes you don't mind if I add a more esoteric hotkey that won't conflict with anything else (the way Ctrl+O would)... So if I make it like Ctrl+Shift+E something silly that would still be ok for your purposes?

Any hotkey however weird would do just fine. I'll just remap it with AutoHotkey.

RCJacH

  • Participant
  • Joined in 2016
  • *
  • Posts: 1
Is it possible to add "open location" action to actions in Hotkeys list? So we can use Alt+#, or better a Alt+Shift+# to open location of #th item?

Original address: https://www.donationcoder.com/forum/index.php?topic=45191.0