Skip to content

Single, double press or hold a hotkey in Flow Launcher. One hotkey - three actions! You can also open FL using Windows key.

License

Notifications You must be signed in to change notification settings

JoyHak/Flow-Launcher-windows-key

Repository files navigation

The repository contains two scripts:

Flow Hotkeys: allows you to utilise the extended potential of your keyboard and Windows key! No more need to assign different hotkeys in PowerToys and memorise them: you can single, double press or hold a key. One shortcut - three actions!

ShowTargets: shows the menu that allows you to open the .lnk/.url target folder or open the folder where the file itself is located. Use the visual way of moving if you don't like hotkeys!

FlowHotkeys

You no longer have to pull your fingers to Ctrl to open the folder where the file is stored. The handy combination Alt+Enter will help you:

  • Single-press: open .lnk target folder (folder where the program is located)
  • Hold: open the folder where the file is located

If a non .lnk file is selected, both actions work the same way. So you can use single-press by default.

If you need to open the file in an editor (e.g. Notepad) or any other application, press Alt+Enter twice.

You can change the application or disable this option in the tray, this will speed up the key response time. The key will be considered held after 100ms instead of 300ms!

To use the Windows context menu, use Shift+Enter instead of Alt+Enter:

  • Single-press: open Flow Launcher context menu
  • Twice: open Windows context menu
  • Hold: run as admin

Use the Windows key to open Flow Launcher.

  • Single-press: open Flow Launcher
  • Twice: open settings

To use shortcuts with the Windows key, you will have to hold it a little longer than usual (300 ms) until “Win holded” appears.

You can get around this limitation. If you have any AHK script, add this line to the beginning:

~LWin::SendEvent("{Blind}{vkFF}")

This line must be outside Flow Hotkeys and must not be imported with #Include!

Then replace

FlowLauncher.add("LWin", LWin_FlowLauncher, "")
with:

FlowLauncher.add("LWin",  LWin_FlowLauncher,  "",,,, "~")

You can also reduce the `tapTime` and `holdTime` values to speed up the keys. In this case you need to press twice very fast. **`tapTime` should be at least 50ms less than `holdTime`!**

ShowTargets

If you are not comfortable using the keys, this menu allows to open the destination folder of the .lnk file or target url of the .url file; Also you can open the folder where the .lnk or .url file itself is located. If another file is selected, the folder where the file is located will be opened. The menu is accessed by pressing Alt+Enter. The behavior of current and previous menus can be changed in Tray. For example, you can leave the menu after clicking a link.

Installation

  1. Download the latest version.

Subscribe to releases so you don't miss critical updates!

  1. Run .exe for your CPU architecture and check it's existence in the tray.

  2. The script starts automatically after Windows Log-on. You can disable this option via the Tray.

Contribution

You can suggest new keys, improve the code or ask questions via issues. I will be glad to see any suggestions for extending this script! Thanks to EvilC for the TapHoldManager library.

Scripting

This script is written in the Autohotkey language.

  1. Download stable Autohotkey v2 and install it.

  2. When the installation is complete, you are presented with another menu. Choose Run AutoHotkey. Once the AutoHotkey help file opens, you can read or close it now.

  3. Download the required version of Source code.zip.

  4. Unpack .zip and run required .ahk script. Check it's existence in the tray. You can change icon in Libs\.

Compiling

Scripts can be automatically compiled using ahk2exe which is here by default: C:\Program Files\AutoHotkey\Compiler\Ahk2Exe.exe (download from here). Or install from here: C:\Program Files\AutoHotkey\UX\install-ahk2exe.ahk

For compilation, you need to select the .exe AHK v2 with Unicode support. They can be found here:

C:\Program Files\AutoHotkey\v2\AutoHotkey64.exe
C:\Program Files\AutoHotkey\v2\AutoHotkey32.exe

Directives are used for compilation, but it can be set manually at each compilation using the ahk2exe GUI. But this is inconvenient because you will need to manually perform different actions each time you run it and you lose the benefits of directives:

Script compiler directives allow the user to specify details of how a script is to be compiled via Ahk2Exe. Some of the features are:

  • Ability to change the version information (such as the name, description, version...).
  • Ability to add resources to the compiled script.
  • Ability to tweak several miscellaneous aspects of compilation.
  • Ability to remove code sections from the compiled script and vice versa.

About

Single, double press or hold a hotkey in Flow Launcher. One hotkey - three actions! You can also open FL using Windows key.

Resources

License

Stars

Watchers

Forks

Packages

No packages published