chinese-words-separator / chinese-words-separator.github.io

6 stars 1 forks source link

Copy highlighted text to clipboard #31

Closed victorlin closed 2 days ago

victorlin commented 4 days ago

The keyboard shortcuts are great, they make this extension very powerful. One thing that I wish could be done more easily is to copy just the highlighted text to the clipboard. The only built-in action is to copy the entire definition entry or some parts of it.

The workaround I found was to remap the definition copy actions to an arbitrary unused character (couldn't unmap the actions) then use the system ⌘+C to copy the text. This isn't terrible, but I'm wondering if you would consider supporting this as a built-in function.

chinese-words-separator commented 4 days ago

Do you mean to copy only one word from the sentence dictionary? If you intend to copy only the highlighted word in the sentence dictionary like in the video below, you need to temporarily switch to word dictionary instead, and then you press the keyboard shortcut c to copy. To temporarily switch to word dictionary, press the Ctrl key and then hover the mouse cursor on the word you want to copy, this will highlight the word you want to copy, and then press the keyboard shortcut c to copy.

https://github.com/user-attachments/assets/8749752d-5b06-4029-8c1f-2d5613496552

victorlin commented 3 days ago

Sorry, let me clarify. I am already using the word dictionary. In your video example, I get this in the clipboard:

願望 愿望 yuànwàng desire。 wish …

when I only want "愿望"

chinese-words-separator commented 3 days ago

Double-click the word in the page, and then press ⌘+C

You can also use an extension to automate the copying of double-clicked word into the clipboard, so there's no need to press ⌘+C, e.g., https://chromewebstore.google.com/detail/double-click-to-clipboard/lhchgmglnhifidmalgeohaagfhmckpmo

You can also right click the word in the text, the text will be automatically selected by word (a word can be multiple characters), Chrome is smart enough to detect word boundaries and will automatically select multiple characters if the Chinese word is made of multiple characters. After right-clicking a word, then select Copy

chinese-words-separator commented 3 days ago

When you are using CWS's words separator and if Chrome did not select the whole word as the word is a compound word, you need to use triple-click on the word. Caveat, when not using CWS, triple-clicking a text selects the whole paragraph, not the compound word only

Double-clicking the 生 in 生命科學 will only select 生命, triple-clicking 生 will select the whole word 生命科學

victorlin commented 2 days ago

Thank you, I will continue to use ⌘+C.