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

Replace Windows Search with PowerToys Run #3529

Closed
martinmine opened this issue May 22, 2020 · 35 comments
Closed

Replace Windows Search with PowerToys Run #3529

martinmine opened this issue May 22, 2020 · 35 comments
Labels
Product-PowerToys Run Improved app launch PT Run (Win+R) Window Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@martinmine
Copy link

martinmine commented May 22, 2020

Summary of the new feature/enhancement

Title says it all. When pressing Win+S, or starting typing after having opened the Windows start menu, I want PowerToys Run to appear instead. UX-wise, the user can select this option through a switch in the settings for PowerToys Run to replace the Windows Search experience.

Proposed technical implementation details

Everything can achieve the same functionality using a registry edit. Albeit dated, I guess PowerToys can use the same approach to achieve the same behavior.

@crutkas
Copy link
Member

crutkas commented May 22, 2020

we will improve our ability to override keys in settings so if you wanted win+s to do it, you could

@crutkas
Copy link
Member

crutkas commented May 22, 2020

This is being tracked by #2325

@crutkas crutkas closed this as completed May 22, 2020
@crutkas crutkas added Product-PowerToys Run Improved app launch PT Run (Win+R) Window Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. labels May 22, 2020
@martinmine
Copy link
Author

@crutkas Will that also involve just pressing the Win and start typing? This issue was more to replace the entire Search experience with PowerToys Run (irrelevant of pressing any hotkey or not).

@crutkas
Copy link
Member

crutkas commented May 22, 2020

if you wanted to, that could work too. We just need to do the low level hook work.

@martinmine
Copy link
Author

That would be awesome, looking forward to it!

@275RR
Copy link

275RR commented Jun 18, 2020

^ this is exactly what i was hoping to get out of the power toys feature as well.

@crutkas
Copy link
Member

crutkas commented Jun 19, 2020

This will be in 0.19 :)

@Joshlucpoll
Copy link

This will be in 0.19 :)

Are there any updates on the development of this feature?

@crutkas
Copy link
Member

crutkas commented Aug 3, 2020

you can override the shortcut if you want via PT Run's settings.

in mine i use Win+Space
image

@gmmedia
Copy link

gmmedia commented Jan 12, 2021

But it is not possible to set on "Win".
That would be nice.

@dolphin-cat
Copy link

you can!
Capture2
Capture

@LucasOe
Copy link

LucasOe commented Aug 15, 2021

if you wanted to, that could work too. We just need to do the low level hook work.

@crutkas Is this feature included in the newest version? I would like PowerToys Run to appear when I start typing after pressing the Win key. I don't see any setting for this.

@Aaron-Junker
Copy link
Collaborator

if you wanted to, that could work too. We just need to do the low level hook work.

@crutkas Is this feature included in the newest version? I would like PowerToys Run to appear when I start typing after pressing the Win key. I don't see any setting for this.

No it isn't

@Tiebe
Copy link

Tiebe commented Nov 9, 2021

you can! Capture2 Capture

this makes it so that you cant do stuff like Win+R anymore

@jthoward64
Copy link
Contributor

I'd love to see some attention on the half of this question thats hasn't been fixed now that windows 11 is out. For power users this is an objectively better search tool than built in search and I would love to have it's backend be able to replace the start menu search box. Don't get me wrong,windows search is fine for a lot of ppl but being able to type =653/7 and the like it very useful and i wont yse windows search until it either is or rivals the performance of powertoys run.

@LucasOe
Copy link

LucasOe commented Dec 17, 2021

I'd love to use PowerToys Run instead of the native Windows search when pressing the Win key and starting to type. I've remapped Win+S to PowerToys Run a long time ago, but my muscle memory still presses the Win key and starts typing when I want to open a certain program.
I think from a User Experience it's annoying to have two methods for opening files, one of which is worse in every way. A way to user PowerToys Run when pressing the Win key and starting to type would be highly appreciated.

@JaffaKetchup
Copy link

Hi there,
Any news of this? I would much prefer PowerToys Run to open by default instead of Windows Search as well.
I am also open to a workaround, perhaps similar to the link in the original issue? Re-assigning the Windows key probably isn't an option for me.
Thanks for all the amazing features!

@coinzdude
Copy link

Why is this closed

@jthoward64
Copy link
Contributor

Why is this closed

I believe this was incorrectly triaged as just wanting a way to override win+s and not the bit about replacing the search box.

@AChangXD
Copy link

It would be nice to override the default behavior of ONLY pressing the windows key. Otherwise remapping the windows key to PowerToys Run will disable things like Win+D for desktop

@JaffaKetchup
Copy link

Can this be reopened please? Thanks!

@Aaron-Junker
Copy link
Collaborator

We can only set a costum shortcut for it. We can't replace the search of Windows Start Menu (or atleast not through documented ways)

@LucasOe
Copy link

LucasOe commented May 28, 2022

The workaround I'm using for this issue won't fit everyones need, but I'm sharing this in case it helps someone:
I replaced the windows start menu with a custom one using ValliStart, which also lets you run a custom key after input is captured. By using this feature I can run the PowerToys Run when I start typing, but it requires you to replace the deafult start menu.

@JaffaKetchup
Copy link

Thanks @LucasOe, that's a great suggestion!

@TSCarterJr
Copy link

I have setup mine to remap my winkey to bring it up, which is nice, however, as others have states:

Doing so prevents you from doing things like win + cmd.
Me personally, I use: Win + Shift + S for a snapshot, which kills my ability to do that.

Could this be reopened / revisited?

@jthoward64
Copy link
Contributor

At this point I would consider opening a new issue; but replacing windows search is probably out of scope for Power Toys. It would be more on par with a full-on shell replacement

@martinmine
Copy link
Author

The initial idea with this issue was to replace the Windows Search experience with PowerToys Run. Overriding the hotkey is one thing, but I think an actual solution would be to replace Winsows Search itself (when you press the start button on your taskbar and start typing) with PowerToys Run.

@Fefedu973
Copy link
Contributor

Any updates ?

@sugarylettuce49
Copy link

We need this feature it would actually be so great

@MangriMen
Copy link

Нам нужна эта функция, это было бы очень здорово

Согласен

@jthoward64
Copy link
Contributor

Translated:

We need this function, it would be very cool

I agree

Please avoid +1 type comments, there are a lot of people subscribed to this issue. If you want to see work on this simply upvote the original issue, open a new one with any new info you have, or open a PR.

@Fefedu973
Copy link
Contributor

The problem for me (and I don't think I'm alone) is that I have the muscle memory to press the windows button and start typing to search and so I always forget to use power run even though it's much, much better than windows search. Besides, this feature shouldn't be difficult to implement at all and I don't understand the "it's not up to power toys to do this" controversy because it's literally wanted by a lot of people and it's just an optional parameter so why always want to prevent things???

If I had the skills in C++ I would have happily added this functionality but unfortunately I don't know this programming language and in any case my pull request would have been prevented because a few people think that it is not the role of power toys to do this

@H4K0N42
Copy link

H4K0N42 commented Mar 28, 2024

I use this: #5571 (comment)

@Fefedu973
Copy link
Contributor

Fefedu973 commented Mar 30, 2024

⚠️ THIS COMMENT IS OUTDATED ! PLEASE USE THE SCRIPT IN THE NEXT MESSAGE !

I found a good temporary solution !
I use this autoHotkey script that I have modified a bit and it does the job really well.
You can compile it using autoHotkey


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

StartMenuWindowName := "Search" ; Change this to match the title of the "Search" window it depends on the language
if A_Args.Length() > 0
{
    StartMenuWindowName := A_Args[1]
}

TriggerEverythingToolbar()
{
    BlockInput, On
    lastKey := A_ThisHotkey
    Send, {Esc}
    WinWaitNotActive, %StartMenuWindowName%
    Send, !{Space} ; Send Alt + Space
    Sleep, 1
    Send, %lastKey%
    BlockInput, Off
}

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

; Trigger when Ctrl+V is pressed in the start menu
#IfWinActive Rechercher
^v:: 
    TriggerEverythingToolbar()
#IfWinActive

EDIT: I have fixed issues with special characters and numpad keys that weren't working properly. Tell me if you face any issues !

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

StartMenuWindowName := "Rechercher" ; Change this to match the title of the "Rechercher" window
if A_Args.Length() > 0
{
    StartMenuWindowName := A_Args[1]
}

TriggerEverythingToolbar()
{
    BlockInput, On
    lastKey := A_ThisHotkey
    Send, {Esc}
    WinWaitNotActive, %StartMenuWindowName%
    Send, !{Space} ; Send Alt + Space instead of Windows + Alt + S
    Sleep, 1
    Send, {%lastKey%}
    BlockInput, Off
}

; Trigger when "Rechercher" window is activated
Hotkey, IfWinActive, %StartMenuWindowName%
Characters := "!#$%&'()*+,-./0123456789:;<=>?@_abcdefghijklmnopqrstuvwxyz{}|\`àèé²,\#{[|`\ç^@]}°§ù¨¤£µ """
Loop, Parse, Characters
{
    Hotkey, %A_LoopField%, TriggerEverythingToolbar
}

NumpadKeys := "Numpad0|Numpad1|Numpad2|Numpad3|Numpad4|Numpad5|Numpad6|Numpad7|Numpad8|Numpad9|NumpadAdd|NumpadSub|NumpadMult|NumpadDiv|NumpadDot"
Loop, Parse, NumpadKeys, |
{
    Hotkey, % A_LoopField, TriggerEverythingToolbar
}

; Trigger when Ctrl+V is pressed in the start menu
#IfWinActive Rechercher
^v:: 
    TriggerEverythingToolbar()
    Send, ^v  ; Send Ctrl+V to paste clipboard content
#IfWinActive


@Fefedu973
Copy link
Contributor

Ok guys i have made a way better version and it works flawlessly now (if you make this script run on start it will achieve 100% of what this issue want to solve). My new script is way faster, more reliable and handles very well fast typing. You can try it out by copying the script down there, save it as an .ahk file and adjusting it to suits your needs (MAKE SURE TO READ THE INSTRUCTIONS IN THE SCRIPTS COMMENTS AT THE BEGINNING !!!) and then compile it using AutoHotkey software to run it as an exe and put it in the shell:startup folder if you want it to start on boot :

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


; If you want to add keys to the list, you can use the following format:
; key::TriggerPowerToysRun("key") ; Trigger when "key" is pressed in the start menu
; For example, to add the key "a" to the list, you would use the following line:
; a::TriggerPowerToysRun("a") ; Trigger when "a" is pressed in the start menu
; You can add it below the existing lines or replace them with your own list of keys. After the #If directive, you can add more keys in the same format.

; You need to replace "Search" with the title of the Windows search window in your language. You can find the title by looking at the task manager.
; You need to replace it in the variable "StartMenuWindowName" below and in the #If directive.

; You can also change the hotkeys to trigger the PowerToys Run window based on your PowerToys configuration. (the default is Alt+Space) it is easier to change the config in PowerToys than to change the script though.
; You can change the hotkey by changing the "Send, !{Space}" line in the "TriggerPowerToysRun" function below.

; Finally, if you want to use this script to open a different program or window, you can replace the "Send, !{Space}" line in the "TriggerPowerToysRun" function with the appropriate command to open the desired program or window.
; And don't forget to replace the WinWaitActive line with the appropriate window title or process name of the window you want to open.

; For a smoother experience, you can then compile the script and add it to the startup folder of your computer (shell:startup) so that it starts automatically when you log in.



StartMenuWindowName := "Search" ; Change this to match the title of the "Search" window


global g_BufferedKeys := []
global HotkeysEnabled := 1

TriggerPowerToysRun(key)
{
    BufferInput()
    HotkeysEnabled := 0 
    Send, {Esc}
    WinWaitNotActive, %StartMenuWindowName%
    Send, !{Space} ; Change this line to the hotkey you use to open the PowerToys Run window
    WinWaitActive, ahk_exe PowerToys.PowerLauncher.exe, , 1 ; Change this line to match the window title or process name of the PowerToys Run window if it is different
    Send, %key%
    BufferInput(0)
    HotkeysEnabled := 1
}

#If WinActive("Search") and HotkeysEnabled ; Change "Search" to match the title of the Windows search window in your language
    a::TriggerPowerToysRun("a") ; Trigger when "a" is pressed in the start menu
    b::TriggerPowerToysRun("b") ; Trigger when "b" is pressed in the start menu
    c::TriggerPowerToysRun("c") ; Trigger when "c" is pressed in the start menu
    d::TriggerPowerToysRun("d") ; Trigger when "d" is pressed in the start menu
    e::TriggerPowerToysRun("e") ; Trigger when "e" is pressed in the start menu
    f::TriggerPowerToysRun("f") ; Trigger when "f" is pressed in the start menu
    g::TriggerPowerToysRun("g") ; Trigger when "g" is pressed in the start menu
    h::TriggerPowerToysRun("h") ; Trigger when "h" is pressed in the start menu
    i::TriggerPowerToysRun("i") ; Trigger when "i" is pressed in the start menu
    j::TriggerPowerToysRun("j") ; Trigger when "j" is pressed in the start menu
    k::TriggerPowerToysRun("k") ; Trigger when "k" is pressed in the start menu
    l::TriggerPowerToysRun("l") ; Trigger when "l" is pressed in the start menu
    m::TriggerPowerToysRun("m") ; Trigger when "m" is pressed in the start menu
    n::TriggerPowerToysRun("n") ; Trigger when "n" is pressed in the start menu
    o::TriggerPowerToysRun("o") ; Trigger when "o" is pressed in the start menu
    p::TriggerPowerToysRun("p") ; Trigger when "p" is pressed in the start menu
    q::TriggerPowerToysRun("q") ; Trigger when "q" is pressed in the start menu
    r::TriggerPowerToysRun("r") ; Trigger when "r" is pressed in the start menu
    s::TriggerPowerToysRun("s") ; Trigger when "s" is pressed in the start menu
    t::TriggerPowerToysRun("t") ; Trigger when "t" is pressed in the start menu
    u::TriggerPowerToysRun("u") ; Trigger when "u" is pressed in the start menu
    v::TriggerPowerToysRun("v") ; Trigger when "v" is pressed in the start menu
    w::TriggerPowerToysRun("w") ; Trigger when "w" is pressed in the start menu
    x::TriggerPowerToysRun("x") ; Trigger when "x" is pressed in the start menu
    y::TriggerPowerToysRun("y") ; Trigger when "y" is pressed in the start menu
    z::TriggerPowerToysRun("z") ; Trigger when "z" is pressed in the start menu
    !::TriggerPowerToysRun("!") ; Trigger when "!" is pressed in the start menu
    #::TriggerPowerToysRun("#") ; Trigger when "#" is pressed in the start menu
    $::TriggerPowerToysRun("$") ; Trigger when "$" is pressed in the start menu
    &::TriggerPowerToysRun("&") ; Trigger when "&" is pressed in the start menu
    *::TriggerPowerToysRun("*") ; Trigger when "*" is pressed in the start menu
    -::TriggerPowerToysRun("-") ; Trigger when "-" is pressed in the start menu
    .::TriggerPowerToysRun(".") ; Trigger when "." is pressed in the start menu
    /::TriggerPowerToysRun("/") ; Trigger when "/" is pressed in the start menu
    0::TriggerPowerToysRun("0") ; Trigger when "0" is pressed in the start menu
    1::TriggerPowerToysRun("1") ; Trigger when "1" is pressed in the start menu
    2::TriggerPowerToysRun("2") ; Trigger when "2" is pressed in the start menu
    3::TriggerPowerToysRun("3") ; Trigger when "3" is pressed in the start menu
    4::TriggerPowerToysRun("4") ; Trigger when "4" is pressed in the start menu
    5::TriggerPowerToysRun("5") ; Trigger when "5" is pressed in the start menu
    6::TriggerPowerToysRun("6") ; Trigger when "6" is pressed in the start menu
    7::TriggerPowerToysRun("7") ; Trigger when "7" is pressed in the start menu
    8::TriggerPowerToysRun("8") ; Trigger when "8" is pressed in the start menu
    9::TriggerPowerToysRun("9") ; Trigger when "9" is pressed in the start menu
    <::TriggerPowerToysRun("<") ; Trigger when "<" is pressed in the start menu
    =::TriggerPowerToysRun("=") ; Trigger when "=" is pressed in the start menu
    >::TriggerPowerToysRun(">") ; Trigger when ">" is pressed in the start menu
    ?::TriggerPowerToysRun("?") ; Trigger when "?" is pressed in the start menu
    @::TriggerPowerToysRun("@") ; Trigger when "@" is pressed in the start menu
    _::TriggerPowerToysRun("_") ; Trigger when "_" is pressed in the start menu
    |::TriggerPowerToysRun("|") ; Trigger when "|" is pressed in the start menu
    ^::TriggerPowerToysRun("{^}") ; Trigger when "^" is pressed in the start menu
    Numpad0::TriggerPowerToysRun("0") ; Trigger when Numpad0 is pressed in the start menu
    Numpad1::TriggerPowerToysRun("1") ; Trigger when Numpad1 is pressed in the start menu
    Numpad2::TriggerPowerToysRun("2") ; Trigger when Numpad2 is pressed in the start menu
    Numpad3::TriggerPowerToysRun("3") ; Trigger when Numpad3 is pressed in the start menu
    Numpad4::TriggerPowerToysRun("4") ; Trigger when Numpad4 is pressed in the start menu
    Numpad5::TriggerPowerToysRun("5") ; Trigger when Numpad5 is pressed in the start menu
    Numpad6::TriggerPowerToysRun("6") ; Trigger when Numpad6 is pressed in the start menu
    Numpad7::TriggerPowerToysRun("7") ; Trigger when Numpad7 is pressed in the start menu
    Numpad8::TriggerPowerToysRun("8") ; Trigger when Numpad8 is pressed in the start menu
    Numpad9::TriggerPowerToysRun("9") ; Trigger when Numpad9 is pressed in the start menu
    NumpadAdd::TriggerPowerToysRun("{+}") ; Trigger when NumpadAdd is pressed in the start menu
    NumpadSub::TriggerPowerToysRun("-") ; Trigger when NumpadSub is pressed in the start menu
    NumpadMult::TriggerPowerToysRun("*") ; Trigger when NumpadMult is pressed in the start menu
    NumpadDiv::TriggerPowerToysRun("/") ; Trigger when NumpadDiv is pressed in the start menu
    NumpadDot::TriggerPowerToysRun(".") ; Trigger when NumpadDot is pressed in the start menu
    $(::TriggerPowerToysRun("(") ; Trigger when "]" is pressed in the start menu
    $)::TriggerPowerToysRun(")") ; Trigger when "]" is pressed in the start menu
    %::TriggerPowerToysRun("%") ; Trigger when "%" is pressed in the start menu
    $'::TriggerPowerToysRun("'") ; Trigger when "'" is pressed in the start menu
    $,::TriggerPowerToysRun(",") ; Trigger when "," is pressed in the start menu
    $;::TriggerPowerToysRun(";") ; Trigger when ";" is pressed in the start menu
    $"::TriggerPowerToysRun("""") ; Trigger when '"' is pressed in the start menu
    $+::TriggerPowerToysRun("{+}") ; Trigger when "+" is pressed in the start menu
    $<^>!\::TriggerPowerToysRun("{\}") ; Trigger when "\" is pressed in the start menu
    $<^>!{::TriggerPowerToysRun("{{}") ; Trigger when "{" is pressed in the start menu
    $<^>!}::TriggerPowerToysRun("{}}") ; Trigger when "}" is pressed in the start menu
    $<^>!#::TriggerPowerToysRun("{#}") ; Trigger when "#" is pressed in the start menu
    $<^>![::TriggerPowerToysRun("{[}") ; Trigger when "[" is pressed in the start menu
    $<^>!]::TriggerPowerToysRun("{]}") ; Trigger when "]" is pressed in the start menu
    $<^>!~::TriggerPowerToysRun("{~}") ; Trigger when "~" is pressed in the start menu
    $<^>!|::TriggerPowerToysRun("{|}") ; Trigger when "|" is pressed in the start menu
    $<^>!`::TriggerPowerToysRun("{``}") ; Trigger when "`" is pressed in the start menu
    $<^>!@::TriggerPowerToysRun("{@}") ; Trigger when "@" is pressed in the start menu
    $space::TriggerPowerToysRun("{Space}") ; Trigger when Space is pressed in the start menu
    $é::TriggerPowerToysRun("é") ; Trigger when "é" is pressed in the start menu
    $è::TriggerPowerToysRun("è") ; Trigger when "è" is pressed in the start menu
    $ç::TriggerPowerToysRun("ç") ; Trigger when "ç" is pressed in the start menu
    $à::TriggerPowerToysRun("à") ; Trigger when "à" is pressed in the start menu
    $°::TriggerPowerToysRun("°") ; Trigger when "°" is pressed in the start menu
    $²::TriggerPowerToysRun("²") ; Trigger when "²" is pressed in the start menu
    $¨::TriggerPowerToysRun("¨") ; Trigger when "¨" is pressed in the start menu
    $<^>!¤::TriggerPowerToysRun("¤") ; Trigger when "¤" is pressed in the start menu
    $£::TriggerPowerToysRun("£") ; Trigger when "£" is pressed in the start menu
    $µ::TriggerPowerToysRun("µ") ; Trigger when "µ" is pressed in the start menu
    $ù::TriggerPowerToysRun("ù") ; Trigger when "ù" is pressed in the start menu
    $§::TriggerPowerToysRun("§") ; Trigger when "§" is pressed in the start menu
    $<^>!€::TriggerPowerToysRun("€") ; Trigger when "€" is pressed in the start menu
    :::TriggerPowerToysRun(":") ; Trigger when ":" is pressed in the start menu
    $+a::TriggerPowerToysRun("A") ; Trigger when "A" is pressed in the start menu
    $+b::TriggerPowerToysRun("B") ; Trigger when "B" is pressed in the start menu
    $+c::TriggerPowerToysRun("C") ; Trigger when "C" is pressed in the start menu
    $+d::TriggerPowerToysRun("D") ; Trigger when "D" is pressed in the start menu
    $+e::TriggerPowerToysRun("E") ; Trigger when "E" is pressed in the start menu
    $+f::TriggerPowerToysRun("F") ; Trigger when "F" is pressed in the start menu
    $+g::TriggerPowerToysRun("G") ; Trigger when "G" is pressed in the start menu
    $+h::TriggerPowerToysRun("H") ; Trigger when "H" is pressed in the start menu
    $+i::TriggerPowerToysRun("I") ; Trigger when "I" is pressed in the start menu
    $+j::TriggerPowerToysRun("J") ; Trigger when "J" is pressed in the start menu
    $+k::TriggerPowerToysRun("K") ; Trigger when "K" is pressed in the start menu
    $+l::TriggerPowerToysRun("L") ; Trigger when "L" is pressed in the start menu
    $+m::TriggerPowerToysRun("M") ; Trigger when "M" is pressed in the start menu
    $+n::TriggerPowerToysRun("N") ; Trigger when "N" is pressed in the start menu
    $+o::TriggerPowerToysRun("O") ; Trigger when "O" is pressed in the start menu
    $+p::TriggerPowerToysRun("P") ; Trigger when "P" is pressed in the start menu
    $+q::TriggerPowerToysRun("Q") ; Trigger when "Q" is pressed in the start menu
    $+r::TriggerPowerToysRun("R") ; Trigger when "R" is pressed in the start menu
    $+s::TriggerPowerToysRun("S") ; Trigger when "S" is pressed in the start menu
    $+t::TriggerPowerToysRun("T") ; Trigger when "T" is pressed in the start menu
    $+u::TriggerPowerToysRun("U") ; Trigger when "U" is pressed in the start menu
    $+v::TriggerPowerToysRun("V") ; Trigger when "V" is pressed in the start menu
    $+w::TriggerPowerToysRun("W") ; Trigger when "W" is pressed in the start menu
    $+x::TriggerPowerToysRun("X") ; Trigger when "X" is pressed in the start menu
    $+y::TriggerPowerToysRun("Y") ; Trigger when "Y" is pressed in the start menu
    $+z::TriggerPowerToysRun("Z") ; Trigger when "Z" is pressed in the start menu
    $^!ç::TriggerPowerToysRun("{^}") ; Trigger when "Ç" is pressed in the start menu

    ; Trigger when Ctrl+V is pressed in the start menu
    ^v:: 
        TriggerPowerToysRun("")
        Send, ^v
#If

BufferInput(start:=1) {
    static ih := ""
    if (start) {
        if (!ih) {
            ih := InputHook("L0 I1")
            ih.KeyOpt("{All}", "N")
            ih.OnKeyDown := Func("BufferInputOnKeyDown")
        }
        ih.Start()
    } else {
        While g_BufferedKeys.Count()
        {
            Key := g_BufferedKeys.RemoveAt(1)
            Send % Format("{vk{:02X}sc{:03X}}", Key.VK, Key.SC)
        }
        ih.Stop()
    }
}

BufferInputOnKeyDown(InputHook, VK, SC) {
    g_BufferedKeys.Push({VK: VK, SC: SC})
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product-PowerToys Run Improved app launch PT Run (Win+R) Window Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests