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

Autocomplete and paste with suggestions from Internet #138

Closed
sergeevabc opened this issue Dec 11, 2016 · 10 comments
Closed

Autocomplete and paste with suggestions from Internet #138

sergeevabc opened this issue Dec 11, 2016 · 10 comments

Comments

@sergeevabc
Copy link

sergeevabc commented Dec 11, 2016

Add option to choose datasource (e.g. DuckDuckGo instead of Google for privacy-concerned users).

P.S. Idea and animation are borrowed from Anycomplete extension for Mac OSX Hammerspoon.

@sergeevabc sergeevabc changed the title Type faster with suggestions from Internet [PENDING] Type faster with suggestions from Internet Dec 16, 2016
@mtaki14
Copy link

mtaki14 commented Jan 16, 2017

Looks really interesting indeed, would love to see this at some point as well. Additionally I'd suggest the option of opening KP in "suggestion mode" with a different shortcut than the usual as to not require a key modifier and make typing more seamless.

What are your thoughts on this?

@polyvertex
Copy link
Member

@mtaki14 This would be offered optionally and disabled by default, as usual. Otherwise KP would have to fire a network request for each typed character, no matter the purpose of your search. Not acceptable if most of the time you use KP for its Calc plugin for example.

@mtaki14
Copy link

mtaki14 commented Jan 16, 2017

I haven't imagined it any other way. Having this functionality enabled by default wouldn't make sense in the context of what KP does anyway.

Let me clarify, I was more specifically referring to the gif demonstration provided in the original post. In that usecase when writing text and wanting to look up a word or a phrase quickly I thought it would be handy to have the ability to fire KP in "suggestion mode" by defining a keyboard shortcut in settings instead of using a keyword modifier like "s" to initiate a web lookup.

In any case these certainly are more "down the line"-type of thoughts..

@polyvertex
Copy link
Member

You mean, being able to wire a specific item to a hotkey so you just have to type its arguments when KP is fired. This is a feature on its own then. It's already in my todo list but honestly, it would feel kind of techy to configure mainly because you would have to give the exact item_id property of the target item to associate it to your hotkey in the config file. Requiring you to Alt+Enter on this very item first then copy-paste its item_id from the console to the config file. Quite ugly from a UX stand point but effective.

@mtaki14
Copy link

mtaki14 commented Jan 16, 2017

Yes, nailed it. That's exactly what I was referring to.

@polyvertex polyvertex changed the title [PENDING] Type faster with suggestions from Internet Autocomplete and paste with suggestions from Internet Jan 17, 2017
@polyvertex
Copy link
Member

On the initial request, after a bit of digging, technically-wise the online request would take close to no time to implement since all the tools are already available in Keypirinha to do that. However the "paste" part, that is, automatically copy the selected suggestion to a third-party application, is cumbersome on Windows to say the least as there is no standard way to do it. It's a hack, actually a whole battery of hacks (like simulating a Ctrl+V or trying to send the text directly to the application in the hope that it will work; without having Windows blocking it due to some magical UIPI rule). That would have to be implemented on an almost per-third-party-application basis. Many users would find this feature unstable or unreliable. With reason.

So unfortunately, while it would be a cool and nice-to-have feature, it is not worth the hassle of implementing it and worse: maintaining it. So, I will stick to the initial plan of just being able to copy the suggestion to the clipboard; which requires just a single keystroke more for the "paste" part, compared to the request feature. Sorry.

@mtaki14
Copy link

mtaki14 commented Jan 31, 2017

That's understandable and completely fine imo. Will the extra keystroke you are referring to copy be the "Enter" key same as with the Calc package?

@polyvertex
Copy link
Member

@mtaki14 Yes it will be the usual way to copy the suggestion. I was referring to the "paste" part of the operation that will require you to Ctrl+V instead of being automated.

@EhsanKia
Copy link

I'd be happy enough with this only copying to my clipboard, no need to actually paste it. I was wondering if you or anyone had started working on this because I was also planning on giving it a quick try.

@polyvertex
Copy link
Member

@EhsanKia this feature is available since v2.11 with the WebSuggest package. Just use the "Copy result" action, or make it default using package's config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants