-
Notifications
You must be signed in to change notification settings - Fork 48
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
Feature Request: Copy Definition to Clipboard #50
Comments
Thank you very much! |
Thanks Brian! That would be pretty amazing to have it :) |
That's awesome! This is something I never knew I wanted to have, but now I see how it would make my life so much easier. |
Yep, it's お盆休み here so while I still have work, I hope to get time in the evenings this week to work on it. I need to make keyboard keys customizable and do the "hold a key to activate" feature first, however. |
The "hold a key to activate" feature has shipped and this is next on my list. I notice rikaikun lets you say how many entries you want to copy. However, I'm guessing that >95%? of the time you really just want the top entry and copying those other entries would just get in the way. I try to keep Rikaichamp simple so I'd like to add as few configuration options as possible. I'm wondering if we should just make it copy the first entry? That would also obviate the need for rikaikun's "Line ending" setting. The other setting in rikaikun is "Field separator". What are folks' specific requirements here? One option is just to use a format similar to the data file, e.g.
Perhaps we could pretty it up a little:
I wonder if a multi-key shortcut makes sense? e.g.
Then maybe we could even have Please let me know if you have any suggestions! |
Another thought: I'm not sure how folks are using this, but if they're collecting a whole bunch of words at once we could make it so that some other shortcut key lets you append to the clipboard. e.g. you hover over one word, hit That's probably overkill though and it suffers the same problem as vim where if on one occasion you fail to use the append version of the command you lose all your previous work. |
I don't think this is a good idea while bug #26 is haunting us. |
Good point. But I still find that the top entry is the one I want > 95% of the time (maybe I'm just looking up very specific words?), and if this feature adds the ability to select other entries then I don't think it will be problem. (I do plan to fix #26 but it will take a while longer.) |
Hey Brian! Copy behaviour
Visual presentation Multiple clipboard entries support
Thank you so much for working on this, Brian! |
I'm curious about the use case for copying all the different entries? When do you want to do that? Just taking the 上場 example from above, copying all the entries would mean you get four different entries for 上 which you almost certainly don't want. Leaving the numbers sounds fine. Adding line breaks sounds neater, but I suspect it would make the feature less versatile. Although again, I'm not really sure how folks are intending to use this. Yeah, let's forget the append-to-clipboard behavior. It's complicated and requires extra permissions too (i.e. |
Hey Brian! Yes, with you on all your other comments! ######### Behaviour 1 will copy this definition Behaviour 2 will copy these definitions Behaviour 2 would allow me to capture muscle/sinew without the need for a specific keyboard shortcut to copy definition 3. It means I'm deleting definitions 1 and 2, but means I only need to know two keyboard shortcuts to copy either one or all my definitions. |
Oh, that makes sense. The current approach I have in mind is as follows:
So in the common case where you just want to copy the first entry you just type c e in rapid succession. In the case where the entry you want is the third one you'd type c c c e. Ideally the pop-up itself would show a little guide after pressing c once saying, e.g. "Copy: (That said, this feature is getting a little bit more involved than I originally anticipated so I'm not sure yet if I should come back to it after working on fixing the dictionary database. Initially I thought I'd knock over a few "easy" features then fix all the database issues but at this rate I'm not sure which will land first.) |
Got you. (For selfish reasons) I'd rather see the simplest version possible. |
Would like to show my interest in this feature too. I copy and paste definitions into Anki often--Chrome's rikaikun extension does have copy to clipboard and it's the only reason why I use the browser. Text hovering is choppy however and it feels much, much nicer in rikaichamp. For my own selfish reasons: I would be happy with a single C keypress copying all definitions visible in the pop-up. I limit the number of definitions to 5 and typically delete the ones which I don't use manually. Good luck! |
Thanks for the feedback. As a result I started working on this yesterday. I'll see if I can get something done this week. |
Thanks Brian! looking forward to it :) |
Just an update here. I've been working on this pretty steadily for the last 2 weeks. I've had to rewrite fairly large chunks of the add-on but I think most of the hard work is now done. Hopefully should be done in a few days' time. |
Sorry for the delay, I've been unwell. This is basically done now. I just need to test that there is no perf regression from this. |
Perf looks good. Marking this as done. |
Legend! Thank you so much, Brian! |
Thank you. I'll hopefully publish a new release tomorrow. Otherwise it will be next week. |
Brian, thank you so much! I've tested the new version and it's great. Really like the way you implemented the definition selection interaction. It makes it super clear what's happening. Very well done on this! |
Thanks so much! I'm really glad you like it. Sorry it took so long! (I've noticed, however, that if you don't have the window focused Shift works but c does not. I'm not sure yet if there's anything I can do about that, however.) |
Just tested this myself, really awesome work birtles! I absolutely love how the definition that's being copied is highlighted in the pop-up window. Is there any chance you can get the clipboard feature to work with input fields? I primarily use the extension by transcribing Japanese text into a shrib.com page, and then hovering over words/copying over definitions when I need to. |
Ah, good point. Yeah, Rikaichamp's handling of text fields (particularly multi-line Mind filing an issue to remind me? |
Actually, never mind, issue #20 covers this. |
Cool! I'll be keeping an eye on #20 then. |
Love Rikaichamp. It's been a godsend since Rikaisama went defunct on the new FF.
One feature missing from it is the ability to copy a definition from the clipboard so I can paste it into an SRS or other program.
The text was updated successfully, but these errors were encountered: