Replies: 16 comments 26 replies
-
Update. When the flow is turned off, the window key originally operates.
|
Beta Was this translation helpful? Give feedback.
-
no way to fix the win+(r, d, arrow,...) hotkey? |
Beta Was this translation helpful? Give feedback.
-
For those that have the same issue as me.
This is the code I created, not the best as it looks very messy but it does the job. Hope it helps 😄 LWin:: |
Beta Was this translation helpful? Give feedback.
-
Windows key shortcuts stopped working for me with the original solution. This one seems to do the trick:
|
Beta Was this translation helpful? Give feedback.
-
Just for clarification, for others seeing this in the future you should:
So the following is just using @onesounds's ProcessExist function and combining it with the code directly above this comment by @ibrahimduran. Very easy to combine but simply putting this here for ease of access for people seeing this later. It should work fine but is only tested on Autohotkey v1 so it might not work on v2:
|
Beta Was this translation helpful? Give feedback.
-
Final version, compiled with ahk2exe and put in startup folder. Works with Win + R flow shortcut for cmd. #NoTrayIcon
#SingleInstance
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
LWin::
If ProcessExist ("Flow.Launcher.exe"){
KeyWait, LWin, T0.15
If !ErrorLevel ; if you hold the LWin key for less than 150 milliseconds
Send, !{Space} ; send alt+space
Else ; but if it is held for more than that
Send, {LWin Down} ; hold LWin down
KeyWait, LWin ; and, in both cases, wait for it to be released
}else{ ; if process doesn't exist, windows key will function like normal
Send, {LWin Down}
KeyWait, LWin
}
Send, {LWin Up}
return |
Beta Was this translation helpful? Give feedback.
-
I just realized a better and cleaner way to write the version I previously had written. It uses
|
Beta Was this translation helpful? Give feedback.
-
Here is my own version. I don't want Win to ever use use regular Start, so no more wait 150 ms. If you want to use the start menu, press Fn + Win to open it. This should ignore any other modifier keys so Win + R, Win + E, Win + Alt + S (for any todoist users). Thanks to @AaronB2019 and @brianpardee. Of course it also works with Ahk2exe and you can uninstall Autohotkey after making the exe. Additionally if you want this to work on elevated windows (task manager for example) run the .exe you made using ahk2exe as admin. To do this at startup use Task Scheduler check the "Run with Highest Privilege" and use Configure for: Windows 10 under general. #NoTrayIcon
#SingleInstance
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
LWin & AppsKey::Return
LWin::
If ProcessExist ("Flow.Launcher.exe"){
Send, !{Space} ; send alt+space
KeyWait, LWin ; and, in both cases, wait for it to be released
}else{ ; if process doesn't exist, windows key will function like normal
Send, {LWin Down}
KeyWait, LWin
}
Send, {LWin Up}
return |
Beta Was this translation helpful? Give feedback.
-
This is what I'm using right now, works fine:
|
Beta Was this translation helpful? Give feedback.
-
For anyone other AHK noob like that comes here in the future, The letter is case sensitive. E.g. I wanted to run with CTRL+ALT+L and my script wouldn't launch with:
Instead I had to input a lowercase L(l) like:
|
Beta Was this translation helpful? Give feedback.
-
There will be a new plugin coming to the store that will enable the ability to use the Win key to open and close flow, very good for those that are looking for this functionality. If the plugin hasn't shown up yet for you, you can download it from here also https://github.com/AminSallah/Flow.Launcher.Plugin.WinHotkey ( |
Beta Was this translation helpful? Give feedback.
-
Probably would be good to post your experience to the plugin page so the author can further investigate: https://github.com/AminSallah/Flow.Launcher.Plugin.WinHotkey :) |
Beta Was this translation helpful? Give feedback.
-
To anyone looking for an easy solution-if you have MS Powertoys, it's pretty easy rebind |
Beta Was this translation helpful? Give feedback.
-
hey yall. Dont ya just love driving yourself crazy with AHK?? Haha, I do too. Thanks for inspiration here! After playing most of these examples with bugs and lock ups I found a key combo that works. and it expands the use of the Meta key It has 2 launch options, and a 2nd\sub-key that blocks windows start menu from show its ugly face again 😄 The Windows key now has 3 actions
sidenote about this 2nd key discovery I also use www.Startisback.com for better taskbar, thou I've not used the windows start menu in over a year since I started using Flow Launcher, startisback has a mean keyhook that would always show the start menu when trying to re-bind it with AHK. So this key combo kills 3 bird with one code. 😁 🥳 its taken handful of months to figure this out. Im going to put two code snippet below.
This Code is written in AutoHotkey V1 !
#NoEnv ;recommend for performance and compatibility with future AHK releases.
#SingleInstance, Force ; Only allows one instance of this script to run at a time
#Persistent ; Keeps a script permanently running (that is, until the user closes it or ExitApp is encountered)
SendMode Input ;recommend for new scripts do to its superior speed and reliability
$Lwin::
KeyWait lwin, T0.15
if ErrorLevel
{
sendinput, {Lwin Down} ; LONG PRESS, use Lwin as a hotkey modifier, e.g. Win + X, Shift + Win + →
}
else
{
KeyWait lwin, D T0.15
if ErrorLevel
sendinput, !{space} ; ONE TAP, opens Flow launcher by sending, Alt + Space
else
try run, "C:\Program Files\Quick Access Popup\QAPmessenger.exe" ShowMenuLaunch ; return ; DOUBLE TAP //This line can customized, the other 3 should be left alone.
}
KeyWait lwin
sendinput, {lwin up} ; Releases the Lwin key, prevents the win key from becoming locked down. Also still allows it to be used as a modifier.
return
lwin up::return ; blocks "startisback" and\or the windows start menu from showing\interfering with the new $Lwin functions
#NoEnv ;recommend for performance and compatibility with future AHK releases.
#SingleInstance, Force ; Only allows one instance of this script to run at a time
#Persistent ; Keeps a script permanently running (that is, until the user closes it or ExitApp is encountered)
SendMode Input ;recommend for new scripts do to its superior speed and reliability
Lwin::
KeyWait lwin, T0.15
if ErrorLevel
{
sendinput, {Lwin Down} ; LONG PRESS, use Lwin as a hotkey modifier, e.g. Win + X , Shift + Win + →
}
else
{
KeyWait lwin, D T0.15
if ErrorLevel
sendinput, !{space} ; ONE TAP, opens Flow launcher by sending, Alt + Space
else
sendinput, {lwin} ; DOUBLE TAP, Opens Windows Start menu
}
KeyWait lwin
sendinput, {lwin up} ; Releases the Lwin key, prevents the win key from becoming locked down. Also still allows it to be used as a modifier.
return
|
Beta Was this translation helpful? Give feedback.
-
how do i write a code for autohotkey for task manger to hide app ??? |
Beta Was this translation helpful? Give feedback.
-
Try Autohoteky.
edit file like this.
LWin Up is important part. if write LWin down, it'll make problem other win+something hotkey.
only for start menu, using LWin UP.
{pause} part is your flowlauncher hotkey.
if you using alt+space, change like this.
Now You can run *.ahk and ahk icon will showing into tray.
when you press Left Win key, it'll open/close Flow Launcher.
if you wanna don't use it, right click tray ahk icon ->Exit
I think it is simple logic, and it can be embed to flow launcher.
Beta Was this translation helpful? Give feedback.
All reactions