Flow.Launcher
Flow.Launcher copied to clipboard
Auto-fill search field with selected text
Quite often I like to execute a search for a string that I find in a document or on a web page. At the moment, I have to select the string, copy it, activate Flow Launcher, and then paste it into the search field.
I would prefer if I could just select the string and activate Flow Launcher by a special hotkey so that the search field is automatically pre-filled with the string.
My suggestion is related to #1110. However, the approach suggested there is not optimal, as one would still have to copy the string manually, activate Flow Launcher and then wait for a certain time before the string is automatically pasted into the search field. This is why I suggest a special mode of activating Flow Launcher that automates entering the selected text into the search field, with a special hotkey assigned to this mode.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Sorry for the late response. I did have looked into this before, but haven't found an optimal way to implement this except using clipboard. So what about trigger an auto copy and paste to flow?
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stale for 7 days with no activity. If you feel this issue still needs attention please feel free to reopen.
This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.
So what about trigger an auto copy and paste to flow?
Sorry for not responding earlier. I'm not quite sure that I understand your question. Are you suggesting adding a hotkey to Flow Launcher that triggers copying to the clipboard whatever text is currently selected in the front most application, then activating the Flow Launcher search window, and then pasting the clipboard content into the search field (possibly restoring the original clipboard afterwards)? Actually, that's roughly what I meant by the last sentence of my original post:
This is why I suggest a special mode of activating Flow Launcher that automates entering the selected text into the search field, with a special hotkey assigned to this mode.
Or do you suggest a different approach?
I just found that #1179 describes exactly (and probably more clearly) what I am suggesting.
Furthermore, I learned from this post in #1110 and from this source code that I can set the query of a custom query hotkey to the "built-in shortcut" {clipboard} so that, when I press the custom hotkey, Flow Launcher is activated with its search field prefilled with the content of the clipboard. This is already very close to what I try to achieve.
Also the "built-in shortcut" {active_explorer_path} (source code) does a similar thing, but apparently prefills the search field with the active explorer path.
Would it be possible to extend Flow Launcher by a further "built-in shortcut" such as {current_selection} which gets replaced by whatever is currently selected in the front-most application window? Probably, this would require adding a further helper (similar to FileExplorerHelper.cs) with a function GetCurrentSelection() which does the following:
- get the original clipboard data and store it into a variable
- clear the clipboard
- send "ctrl-c" to the front-most application window to copy the current selection to the clipboard
- wait for the clipboard to contain new data
- get the new clipboard data and store it into a variable
- restore the clipboard to the original clipboard data
- return the new data
Unfortunately, I have no experience in C#. Otherwise, I would try to implement this myself, since it does not seem overly complicated (in my non-expert view).
This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 60 days.\n\nAlternatively this issue can be kept open by adding one of the following labels:\nkeep-fresh
This issue was closed because it has been stale for 7 days with no activity. If you feel this issue still needs attention please feel free to reopen.