Shortcut Key for Context Menu Search?

General discussion related to "Everything".
Post Reply
opal_1
Posts: 6
Joined: Fri Jun 25, 2021 10:31 am

Shortcut Key for Context Menu Search?

Post by opal_1 »

Is it possible to assign a shortcut key for Context Menu search? So after pressing hotkey Everything will launch within that folder.
Attachments
2021-06-25_16-28-32.png
2021-06-25_16-28-32.png (9.28 KiB) Viewed 20561 times
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Shortcut Key for Context Menu Search?

Post by NotNull »

Yes, that is possible. It requires 2 steps:
  1. Type the following in the Everything search bar and press ENTER:

    Code: Select all

    /hotkey_explorer_path_search=1
  2. Go to Menu:Tools > Options > General > Keyboard and enter your keyboard shortcut in the Toggle window Hotkey: field.
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Shortcut Key for Context Menu Search?

Post by tuska »

2NotNull
For me, Everything 1.5.0.1266a (x64) only opens Everything - without path.
Do you have any idea what else could be set there?
 
2021-06-28_Toggle window hotkey-F11_10198.png
2021-06-28_Toggle window hotkey-F11_10198.png (8.52 KiB) Viewed 20450 times
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Shortcut Key for Context Menu Search?

Post by tuska »

Here is a supplementary question:
Why is it necessary to make an additional entry in the Everything search bar (-> /hotkey_explorer_path_search=1),
although there is already a selection option in the Everything options?
---
Maybe I'm doing something wrong, because in Everything version 1.4.1.1011 (x64) I can e.g. after Shift+F11
also only call Everything - without a path in the search bar.
void
Developer
Posts: 16773
Joined: Fri Oct 16, 2009 11:31 pm

Re: Shortcut Key for Context Menu Search?

Post by void »

The hidden /hotkey_explorer_path_search=1 ini setting will change your Everything search to the current path in Windows Explorer, when you press the Everything Hotkey from Windows Explorer.

For me, Everything 1.5.0.1266a (x64) only opens Everything - without path.
Please confirm, in Windows Explorer, press your Everything hotkey.
Does Everything change the search to the current path in Windows Explorer?

-If not, please you please send the debug output after pressing your Hotkey:
  • In Everything, type in the following search and press ENTER:
    /debug
  • In Windows Explorer, press your Everything Hotkey.
  • What is shown in the debug console?

To close the debug console:
  • In Everything, type in the following search and press ENTER:
    /debug
horst.epp
Posts: 1448
Joined: Fri Apr 04, 2014 3:24 pm

Re: Shortcut Key for Context Menu Search?

Post by horst.epp »

Setting the option and a hotkey works perfect here from inside of any Explorer window.

Windows 10 Home x64 Version 21H1 (OS Build 19043.1081)
Everything 1.5.0.1266a (x64)
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Shortcut Key for Context Menu Search?

Post by tuska »

2void
Thanks for the information!

Unfortunately I did not consider that the shortcut only works when using Windows Explorer,
since I almost don't use it.

My attempts to replace the context menu item "Search Everything 1.5a..." in Total Commander with the shortcut F11
were unsuccessful.

In Windows Explorer the shortcut works.

Thanks again!

PS:
Now I at least know what function the "Toggle window Hotkey:" option has,
because I couldn't understand it from the tooltip.
horst.epp
Posts: 1448
Joined: Fri Apr 04, 2014 3:24 pm

Re: Shortcut Key for Context Menu Search?

Post by horst.epp »

tuska wrote: Mon Jun 28, 2021 8:47 am 2void
Thanks for the information!

Unfortunately I did not consider that the shortcut only works when using Windows Explorer,
since I almost don't use it.

My attempts to replace the context menu item "Search Everything 1.5a..." in Total Commander with the shortcut F11
were unsuccessful.

In Windows Explorer the shortcut works.

Thanks again!

PS:
Now I at least know what function the "Toggle window Hotkey:" option has,
because I couldn't understand it from the tooltip.
I use the context menu "Search Everything 1.5a..." in TC for this purpose.
Just searching for an Autohotkey script to assign an hotkey to it.
tuska
Posts: 1052
Joined: Thu Jul 13, 2017 9:14 am

Re: Shortcut Key for Context Menu Search?

Post by tuska »

horst.epp wrote: Mon Jun 28, 2021 8:57 am I use the context menu "Search Everything 1.5a..." in TC for this purpose.
Just searching for an Autohotkey script to assign an hotkey to it.
For such a function I would not want to extend my programs in the systray with an AHK script.
I have now assigned a shortcut (em_command) to the following in Total Commander:

Code: Select all

Command:    C:\Tools\Everything\Everything64.exe
Parameters: -path "%P"
[Button would also be possible].

EDIT:

Code: Select all

From: Command: C:\Tools\Everything\Everything64.exe -parentpath - Parameters: %V
To:   Command: C:\Tools\Everything\Everything64.exe ........... - Parameters: -path "%P" -> better, thanks to NotNull!
Last edited by tuska on Mon Jun 28, 2021 11:02 am, edited 3 times in total.
horst.epp
Posts: 1448
Joined: Fri Apr 04, 2014 3:24 pm

Re: Shortcut Key for Context Menu Search?

Post by horst.epp »

tuska wrote: Mon Jun 28, 2021 9:37 am
horst.epp wrote: Mon Jun 28, 2021 8:57 am I use the context menu "Search Everything 1.5a..." in TC for this purpose.
Just searching for an Autohotkey script to assign an hotkey to it.
If it were possible to use the context menu-shortcut for Windows Explorer in Total Commander, then I would prefer that.

For such a function I would not want to extend my programs in the systray with an AHK script,
because then I could assign a shortcut (em_command) to the following in Total Commander:
Command: C:\Tools\Everything\Everything64.exe -parentpath
Parameters: %V
So you have no need for the Everything hotkey :)
I most often search for instances of files and so this is my prefered button in TC.

Code: Select all

TOTALCMD#BAR#DATA
C:\Tools\Everything\Everything64.exe
-search %S -nonewwindow
C:\Tools\Everything\Icons\Everything-Green.ico
Everything Search for selected file

0
-1
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Shortcut Key for Context Menu Search?

Post by NotNull »

.. or add it to the TC user menu and remap the F11 hotkey to it. Or one of the other many TC configuration options ..
But I don't have to tell you seasoned TC veterans all that of course ;)

For others:
  • In Total Commander, go to Menu:Start > Change Start Menu...
  • Click the Add Item button
  • Total Commander = Everything here
    (or any other name you like)
  • Command = C:\Program Files\Everything\Everything.exe
    (replace with the actual path to your Everything.exe)
  • Parameters = -path "%P"
  • Click the OK button (don't enter the shortcut here)
  • Select Menu:Start > Change Start Menu again
  • Make a note of the line which 'Everything here' is on (let's say 3)
  • Go to Menu:Configuration > Options
  • Select Misc in the left pane (at the bottom)
  • In the Redefine hotkeys (Keyboard remapping) section, select Hotkey = F11
  • Command = cm_UserMenu3 (click on the little magnifying glass to select it)
    (replace cm_UserMenu3 withe the actual line 'Everything here' is on)
  • Press the OK button
  • Press the OK button
  • Done.

PS: What does F11 do out of the box? Nothing?
horst.epp
Posts: 1448
Joined: Fri Apr 04, 2014 3:24 pm

Re: Shortcut Key for Context Menu Search?

Post by horst.epp »

NotNull wrote: Mon Jun 28, 2021 10:02 am ...
PS: What does F11 do out of the box? Nothing?
Without any modifier F11 is free
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Shortcut Key for Context Menu Search?

Post by NotNull »

Thx!
opal_1
Posts: 6
Joined: Fri Jun 25, 2021 10:31 am

Re: Shortcut Key for Context Menu Search?

Post by opal_1 »

So.. how to do it? Answer not clear.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Shortcut Key for Context Menu Search?

Post by NotNull »

Even the original question was not clear ;)

If you want to press a keyboard shortcut in File Explorer to start a search in Everything for the current Explorer folder :
NotNull wrote: Sun Jun 27, 2021 8:41 pm Yes, that is possible. It requires 2 steps:
  1. Type the following in the Everything search bar and press ENTER:

    Code: Select all

    /hotkey_explorer_path_search=1
  2. Go to Menu:Tools > Options > General > Keyboard and enter your keyboard shortcut in the Toggle window Hotkey: field.

If you want something different, please specify.
opal_1
Posts: 6
Joined: Fri Jun 25, 2021 10:31 am

Re: Shortcut Key for Context Menu Search?

Post by opal_1 »

NotNull wrote: Wed Jun 30, 2021 9:14 pm Even the original question was not clear ;)

If you want to press a keyboard shortcut in File Explorer to start a search in Everything for the current Explorer folder :
NotNull wrote: Sun Jun 27, 2021 8:41 pm Yes, that is possible. It requires 2 steps:
  1. Type the following in the Everything search bar and press ENTER:

    Code: Select all

    /hotkey_explorer_path_search=1
  2. Go to Menu:Tools > Options > General > Keyboard and enter your keyboard shortcut in the Toggle window Hotkey: field.

If you want something different, please specify.
Did. Nothing happens. I already had a toggle window shortcut set. It toggled the everything window normally. I want a shortcut for opening Everything with path already set to the folder I pressed the shortcut from. Basically the shortcut to the context menu button (see image). So far nothing helped. That code (/hotkey_explorer_path_search=1) did absolutely nothing.
void
Developer
Posts: 16773
Joined: Fri Oct 16, 2009 11:31 pm

Re: Shortcut Key for Context Menu Search?

Post by void »

/hotkey_explorer_path_search=1 only works for Windows Explorer.

When hotkey_explorer_path_search is enabled, pressing the Everything hotkey from within Windows Explorer will set the Everything search to the current path in Windows Explorer.

Make sure the context menu is not shown when pressing your Everything Hotkey.
-If it is shown, Everything might not receive focus.

What file browser are you using? (what program are you pressing the Everything Hotkey in?)

If Everything is running as an admin, hotkey_explorer_path_search=1 might not work.

Please try running Everything as a standard user:
  • In Everything, from the Tools menu, click Options.
  • Click the General tab on the left.
  • Check Everything service.
  • Uncheck Run as administrator.
  • Click OK.
  • Exit Everything (right click the Everything tray icon and click Exit).
  • Restart Everything.
opal_1
Posts: 6
Joined: Fri Jun 25, 2021 10:31 am

Re: Shortcut Key for Context Menu Search?

Post by opal_1 »

It works now! Thanks for the help.

Now I have a different problem. Now how do I open Everything with keyboard shortcut without folder path (meaning search should remain empty)
It works when I'm not inside folder. I want to use different shortcut for one with folder path and one for normal whole pc search like before.

Hope my question was clear.

One more question.
How to disable /hotkey_explorer_path_search=1 option?

Thanks!
void
Developer
Posts: 16773
Joined: Fri Oct 16, 2009 11:31 pm

Re: Shortcut Key for Context Menu Search?

Post by void »

Unfortunately, there's no option to do that yet.

The hotkey_explorer_path_search setting is either on or off.

To disable hotkey_explorer_path_search:
  • In Everything, type in the following search and press ENTER:
    /hotkey_explorer_path_search=0
  • If successful, hotkey_explorer_path_search=0 is shown in the status bar for a few seconds.
void
Developer
Posts: 16773
Joined: Fri Oct 16, 2009 11:31 pm

Re: Shortcut Key for Context Menu Search?

Post by void »

An AutoHotkey script to launch Everything.exe with the current path in an active Explorer Window with the Ctrl + F9 keypress and
also to run Everything on Ctrl + Shift + F9 without changing the search:

Everything.ahk

Code: Select all

GetActiveExplorerPath(hwnd=0){
	if(hwnd==0){
		explorerHwnd := WinActive("ahk_class CabinetWClass")
		if(explorerHwnd==0)
			explorerHwnd := WinExist("ahk_class CabinetWClass")
	}
	else
		explorerHwnd := WinExist("ahk_class CabinetWClass ahk_id " . hwnd)
	
	if (explorerHwnd){
		for window in ComObjCreate("Shell.Application").Windows{
			try{
				if (window && window.hwnd && window.hwnd==explorerHwnd)
					return window.Document.Folder.Self.Path
			}
		}
	}
	return ""
}

^f9::
path := GetActiveExplorerPath()
Run , "C:\Program Files\Everything\Everything64.exe" -path "%path%"
return

^+f9::
Run , "C:\Program Files\Everything\Everything64.exe"
return
Adjust the keyboard shortcuts (^f9 and ^+f9) as needed.
opal_1
Posts: 6
Joined: Fri Jun 25, 2021 10:31 am

Re: Shortcut Key for Context Menu Search?

Post by opal_1 »

Thanks so much for all your help. The Autohotkey script was awesome!

Thanks again.
Post Reply