Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add option to default to EverythingToolbar instead of native search #63

Closed
oSumAtrIX opened this issue Jan 4, 2021 · 16 comments
Labels
feature idea Requested feature

Comments

@oSumAtrIX
Copy link

An option to replace the search popup window when typing on the keyboard inside the start menu with EverythingToolbar would enhance the seamless integration into windows and ease using EverythingToolbar instantly by skipping the shortcut

@srwi srwi added the feature idea Requested feature label Jan 4, 2021
@Horst12
Copy link

Horst12 commented Jan 5, 2021

What would be the benefit compared to the Toolbar in the taskbar as its now.
Now you can just put the cursor in the Toolbar field and start typing.
There is no faster way to get to this.

@srwi
Copy link
Owner

srwi commented Jan 6, 2021

I actually really like this idea. However I can imagine the implementation being really hacky which I'm really not a fan of. Definitely something to look into though!

@Chillstice
Copy link

I prefer to hide the 'search with Cortana' eyesore since it's an inefficient use of the taskbar and I have muscle memory of hitting the windows key and typing to search. I can't be the only one that does this - so overriding the native search would be highly appreciated.

For the last few years I've been using Wox so I can hit alt+space and start typing to search with Everything, but replacing the native windows search would be a more elegant solution.

@krlvm
Copy link

krlvm commented Jan 8, 2021

I think this could be done in this way - CortanaApp object can be called from JS code and somehow access native APIs (that's how a browser window opens from the Bing search results), but it would require some additional reverse-engineering.

@dan1994
Copy link

dan1994 commented Jan 8, 2021

I prefer to hide the 'search with Cortana' eyesore since it's an inefficient use of the taskbar and I have muscle memory of hitting the windows key and typing to search.

+1!

My main issue here is that I have to use my mouse, which is no fun (for me!). If you could add a keybinding for opening search I could get used to it (not necessarily override win or win+s).

@Horst12
Copy link

Horst12 commented Jan 8, 2021

I prefer to hide the 'search with Cortana' eyesore since it's an inefficient use of the taskbar and I have muscle memory of hitting the windows key and typing to search.

+1!

My main issue here is that I have to use my mouse, which is no fun (for me!). If you could add a keybinding for opening search I could get used to it (not necessarily override win or win+s).

But you have already an hotkey for the toolbar which you also can change.
After pressing the hotkey you can start typing your search.
What is missing here ?

@dan1994
Copy link

dan1994 commented Jan 8, 2021

I actually looked for that and didn't find it. My bad!
As a side note: I see the default is win+shift+s which is already bound to snip & sketch (for everyone I think). Might be worth changing...

@Horst12
Copy link

Horst12 commented Jan 8, 2021

I actually looked for that and didn't find it. My bad!
As a side note: I see the default is win+shift+s which is already bound to snip & sketch (for everyone I think). Might be worth changing...

The default is Win + Alt + S
Thats no collision with any Windows function.

@srwi
Copy link
Owner

srwi commented Jan 8, 2021

I think this could be done in this way - CortanaApp object can be called from JS code and somehow access native APIs (that's how a browser window opens from the Bing search results), but it would require some additional reverse-engineering.

This is a really interesting application!

So the goal of this issue is to search with EverythingToolbar instead of Windows/Cortana. For that I see two different options:

  1. Integrate EverythingToolbar into the existing Windows search window (which is not the start menu!)
  2. Trigger EverythingToolbar whenever the start menu is open and the user starts typing (use a keyboard hook)

Option 1 would require a lot of reverse engineering and significant changes to EverythingToolbar which I don't think is worth it.
The only problem I see with option 2 would be in cases like for @Chillstice where they want to hide any indication of search (search button or search box) completely. In that case it would be counterintuitive to call EverythingToolbar a toolbar and probably cause a lot of confusion.

@dan1994
Copy link

dan1994 commented Jan 8, 2021

I actually looked for that and didn't find it. My bad!
As a side note: I see the default is win+shift+s which is already bound to snip & sketch (for everyone I think). Might be worth changing...

The default is Win + Alt + S
Thats no collision with any Windows function.

My bad again! Sorry for the misinformation.

@krlvm
Copy link

krlvm commented Jan 9, 2021

I think this could be done in this way - CortanaApp object can be called from JS code and somehow access native APIs (that's how a browser window opens from the Bing search results), but it would require some additional reverse-engineering.

This is a really interesting application!

So the goal of this issue is to search with EverythingToolbar instead of Windows/Cortana. For that I see two different options:

  1. Integrate EverythingToolbar into the existing Windows search window (which is not the start menu!)
  2. Trigger EverythingToolbar whenever the start menu is open and the user starts typing (use a keyboard hook)

Option 1 would require a lot of reverse engineering and significant changes to EverythingToolbar which I don't think is worth it.
The only problem I see with option 2 would be in cases like for @Chillstice where they want to hide any indication of search (search button or search box) completely. In that case it would be counterintuitive to call EverythingToolbar a toolbar and probably cause a lot of confusion.

I don't think there's a reason to integrate the app into the search window, but I believe it's possible to inject JS code which will launch the app instead the same way the search window executes commands (type taskkill /f /im explorer.exe and it will work).
I used "Microsoft Edge DevTools (Preview)" from Microsoft Store (it's important) to write this application.

@srwi srwi added discussion info/repro needed Lack of info blocks implementation labels Jan 10, 2021
@ruvaldak
Copy link

ruvaldak commented Jan 12, 2021

Simply having WinKey place the cursor in the search box to allow typing should be enough. Seems EverythingToolbar is placed over top of the windows menu, Basically:
WinKey is pressed
Win menu is opened
Everything search box is activated
Can interact with Win menu and ignore Everything as the search results only appear when typing begins
Can immediately begin typing for search results.

Would probably have to find a way to have it ignore any form of win+ shortcuts. Should probably be fine to have have it check for WinKey released, and ignore WinKey released if another key is pressed. Something to that effect. Bit hackey but should work perfectly fine as a temporary measure. I'm no professional though.

Obviously this would still require at the very least the toolbar to be on the taskbar somewhere. Wouldn't work, at least in it's current state, unless the toolbar is expanded into a text box (so not just a magnifying glass button). Though I figure there's probably a way to have everything be ready to receive text input, but not show the search menu until said text input is received.

If the windows menu and everythingtoolbar are open at the same time and a search option is selected, win menu and everythingtoolbar both close, so that's already taken care of, too.

@srwi
Copy link
Owner

srwi commented Feb 3, 2021

I created a dirty AutoHotkey script to hijack Windows start menu search and redirect it to EverythingToolbar:

#NoEnv
#SingleInstance, Force
#UseHook On
SendMode Input
SetWorkingDir, %A_ScriptDir%
SetTitleMatchMode, 3

StartMenuWindowName := "Search" ; You might change this directly for non-English installations
if A_Args.Length() > 0
{
    StartMenuWindowName := A_Args[1]
}

TriggerEverythingToolbar()
{
    BlockInput, On
    lastKey = %A_ThisHotkey%
    Send, {Esc}
    WinWaitNotActive, %StartMenuWindowName%
    Send, #!s ; Change this if you want to use another EverythingToolbar shortcut
    Sleep, 1
    Send, %lastKey%
    BlockInput, Off
}

Hotkey, IfWinActive, %StartMenuWindowName%
Characters := "!#$%&'()*+,-./0123456789:;<=>?@_abcdefghijklmnopqrstuvwxyz{}|\`"
Loop, Parse, Characters
{
    Hotkey, %A_LoopField%, TriggerEverythingToolbar
}

HijackSearch.zip

If your Windows installation is not in English you have to start it with the start menu window name as a launch parameter. For example for German you would start it with HijackSearch.exe Suche. The easiest way is to create a shortcut of HijackSearch.exe and change the target property. You can find the start menu window name in the task manager:

image

This simulates the default keyboard shortcut to trigger EverythingToolbar which is Win+Alt+S. If your configuration is different either change the script or the EverythingToolbar configuration

It is recommended to run the script as admin because otherwise some lines of code don't work (BlockInput, On/Off) which prevents keypresses from reaching unwanted applications when typing quickly.

I am no AutoHotkey expert and really didn't do a lot of testing. This might not work on older versions of Windows (Windows 10 20H2 here). I am sure this can be done better and more reliably but I still wanted to share.

@ruvaldak
Copy link

ruvaldak commented Feb 4, 2021

Just tried your ahk script @stnkl, works perfectly. Good job on that. Obviously a very hacky way of doing it but it gets the job done quite well.

@ziplock9000
Copy link

Actually, rather than replace, I'd like to have both searches. Maybe in different tabs or all in the same list or something?

@srwi srwi removed the info/repro needed Lack of info blocks implementation label Jun 19, 2021
srwi pushed a commit that referenced this issue Jun 22, 2021
* Add option to replace start menu search (#63)

* Fix native search exception
@srwi
Copy link
Owner

srwi commented Jun 22, 2021

I implemented the autohotkey script in EverythingToolbar. It works quite well for me but I expect it to be problematic for some people. Especially those that are not using a recent version of Windows 10 (and I won't be able to support old versions of Windows myself). Therefore I marked the feature as experimental.

After enabling the option when typing into the start menu it automatically redirects the input to EverythingToolbar. You can prevent that by holding down Alt or Ctrl.

Unfortunately I couldn't find a way to distinguish between the native search app or the start menu being in focus so it will circumvent search app input as well (if not holding down one of the mentioned keys when entering the first search letter). Let me know if anybody knows a way to distinguish between start menu and search app (both give focus to SearchApp.exe).

It will be available for testing in the beta coming later this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature idea Requested feature
Projects
None yet
Development

No branches or pull requests

8 participants