srwi / EverythingToolbar

Everything integration for the Windows taskbar.
Other
9.62k stars 419 forks source link

Allow setting Win+S shortcut in Windows 11 #249

Open bloodyeyesblackblood opened 2 years ago

bloodyeyesblackblood commented 2 years ago

Preflight Checklist

EverythingToolbar Version

0.8.0.0

Windows Version

Win 11 Pro 22H2

Steps to reproduce

  1. Set "Win + S" as the ShortCut for the Win 11 Taskbar
  2. Restart PC
  3. Error

Expected Behavior

  1. Starting Windows
  2. Press Win + S
  3. Search

Actual Behavior

  1. Windows Started, Logged In
  2. Error, shortcut couldn't be Set because it's set somewhere else

Screenshots

image

Log output

Just Old Logs.. nothing new

2022-08-23 16:03:51.4979|INFO|EverythingToolbar started. Version: 0.7.4.0, OS: Microsoft Windows NT 10.0.22621.0| 2022-08-23 16:03:51.8886|ERROR|IPC is not available.| 2022-08-23 16:03:51.8886|ERROR|Failed to get Everything version number. Is Everything running?|

Additional Information

I Know "Win + S" is the default for Windows Default Search.. (but as I saw in anotoher Issue it's intendet that you can set Win Q or Win S) In the Older versions it worked (0.7.4.0) well it was the Windows 10 Taskbar version :(

Oh and the new Version on the Win 11 Taskbar.. Ich liebe dich/euch!! Thank u so much for this Update 😊

srwi commented 1 year ago

In Windows 10 the shortcut gets registered before explorer.exe itself registers Win+S for the Windows default search. In Windows 11 EverythingToolbar gets launched after explorer.exe has already been started so Win+S will already be in use.

This would probably require changes to how the shortcut gets registered.

CodeF53 commented 11 months ago

Hacky Fix

I saw this issue, was upset at the lack of solution, so made a hacky one myself.

Unbinding the default Win+S behavior

Using Powertoys Keyboard Manager, redirect the win+s shortcut to an identifiable, but unique key, like F24: powertoys keyboard manager

Binding Win+S to EverythingToolBar

Then, create an AHK script that listens for that key, and opens EverythingToolbar:

#Requires AutoHotkey >=2.0
#SingleInstance Force

F24:: run "C:\Program Files (x86)\EverythingToolbar\EverythingToolbar.Launcher.exe"
+F24:: Send "{PrintScreen}" ; the powertoys bind unbinds win+shift+s, so rebind it back to snipping tool

Fixing Win+Shift+S snipping tool

The PowerToys rebind breaks win+shift+s, to fix this, the AHK script sends PrtSc when shift is held. We can then bind that back to Snipping Tool by going to Settings > Accessibility > Keyboard and enabling "Use the Print screen key to open Snipping Tool"

Windows Keyboard Accessibility Settings

Making it permanent

To make sure the AHK script is always running:

  1. Open Task Scheduler, Action > Create Basic Task
  2. Trigger: "When I log on"
  3. Action: Start a program - path to your AHK script
fideliochan commented 2 months ago

you don't need those. https://github.com/undergroundwires/privacy.sexy/issues/343#issuecomment-2056089375 this all you need