Author
Topic: Hotkeys & FarrQuickView (Read 8731 times)

I think it would be extremely powerful to add functionality to the hotkey system that supported special keywords or variables in the "Text for search box field". For example you could add a variable/keyword for the currently selected item. This way you could bind a hotkey to perform a certain action on the selected result by using the that item as an argument in combination with any of the many aliases or plugins already available.

Possible workflows could be things like searching for a specific file and then hitting a hotkey to email that file, zip it, delete, rename it, etc.. Or say you are browsing URL's you could hit a hotkey to show that file in FARR's internal browser. You could also add different variables for things like the clipboard contents or currently selected text. With these variables you could do things like highlight a word in your browser or editor and hit a hotkey and have FARR popup with the definition/synonym of that word using a plugin.

Off the top of my head some keywords could be:

<selection> - currently selected item in FARR or the first result<next> - item after the the currently selected item<prev> - item before the the currently selected item<clipboard> - would substitute for clipboard contents<enter> - trigger/launch result or action<cursor> - where to place the cursor. could be useful when needing some user input<delete> - keywords could be added/shared that perform a specific action by using 3rd party tool

The text could look something like:

email <selection><enter> (where email is an alias)igo <selection><enter>igo <next><enter>define <clipboard><enter><selection><rename> - where rename could be an action keyword

I would also imagine that you would need to add an option to specify the scope of the hotkey i.e. global or local. Local hotkeys would only work within FARR whereas global ones would work from anywhere. This could also be expanded to work with plugins similar to how a plugin alias file works. Plugins could then specify hotkeys in a hotkey file that only works within their plugins and have certain plugin specific functions. Keywords/variables could be created for certain actions that could be shared like aliases.

Another really cool features would be a toggle switch (i.e igo <selection><enter> +toggle) or option. This would allow you to toggle between states. So say the currently selected item in FARR's result list is a bookmark, you hit a hotkey and it opens the url up in the internal browser. You hit the same hotkey and it returns you to the result list. You could then also use hotkeys like <next> and <prev> to move through results while in the html view. So in the example above say you have 9 urls listed in the result window. You hit a hotkey and the first one opens up in FARR. You hit another hotkey to move to the next url or another to move back to the prev one.

This all leads up to another feature request of course

FarrQuickView: which would allow you to quickly view the selected result in FARR, similar to total commander for example. I would say this is almost possible now with the new html mode. You could pretty much view any file type using it similar to how you can open up most file types within internet explorer (txt, pdf, mp3, html, xml, etc..). This is also an example of where the toggle switch could be used. This way if you're searching through files etc and want to quickly view the contents you could hit the quick view hotkey, view the file, use another hotkey to move to the next or prev file from the result list and then finally hit the quick view hotkey again to go back to your results list. Functionality could be added to better handle specific file types if needed although the html mode is pretty powerful to begin with. Lastly, for this feature it would be great to display a header or footer with some meta data about the selected item (i.e. size, date created, path, type, etc..) perhaps even file type specific info.

"Global" hotkeys are already there. The currently selected text is available via %cliptext% and "Copy selected text" (see Preferences > Lists > Hotkeys).You can find an example in the screenshot which is appended.

"Global" hotkeys are already there. The currently selected text is available via %cliptext% and "Copy selected text" (see Preferences > Lists > Hotkeys).You can find an example in the screenshot which is appended.

Here's another suggestion relating to the hotkeys - it is at least in the vicinity of this thread so I'll put it here instead of wasting space on an extra thread.

When using "copy selected text", let FARR clear the clipboard before copying the selected text.

That way, if the selected text isn't added to the clipboard (for some reason) then FARR will not accidentally go on to operate on whatever was on the clipboard prior to the hotkey press. Accidentally using prior clipboard content could be problematic if used with a plugin/alias that sends the (potentially sensitive) content to some website, for example via a google search alias or the ninjawords plugin, as illustrated here (note: I have changed the ninjawords plugin alias from "nw" to "df"):

@nitrix-ud: But after my proposed change those wanting a hotkey to start FARR and then operate on what is already on the clipboard can still just set "no clipboard copy" and then put %cliptext% something in the Search Edit Box, right? I haven't actually tried that but I assume that FARR reads whatever is on the clipboard only when it executes something with the %cliptext% variable in it. If I am right about that, then what is the point with keeping the current behaviour as an option?