Ravi
Ravi

Reputation: 303

Double click select does not consider - as a word in Windows 10 for onenote

when i double click on a word with special char "-" in OneNote or xshell it does not copy entire word to clipboard. eg double clicking on a word

                    ravi-test  

mouse just copy word "ravi" to clipboard leaving behind "-test"

is there a way to configure clipboard setting in win 10 so that whole word ravi-test is copied?

thanks

Upvotes: 0

Views: 494

Answers (1)

alepaff
alepaff

Reputation: 103

Unfortunately this feature is not available in OneNote, however it is possible to add it with AutoHotKey. The script that attempts to mimic this is as follows:

    ~LButton:: MouseGetPos x1,,win
If (A_TimeSincePriorHotkey<400) and (A_TimeSincePriorHotkey<>-1){

~LButton Up::
   SetTitleMatchMode, 2                     ; Checks for OneNote. You have to modify or
   If WinActive("OneNote") <> win           ; remove this tree lines to be able to
      Exit                                  ; work with another apps
   MouseGetPos x2
   If (x2 - x1) < -6{
        send {right}
        Send +{LButton} 
    }
   else If (x2 - x1) > 6 Or (A_TickCount - t) < 300
      Send +{LButton}
   t := A_TickCount
   return
}
Return

Thanks to: This, This and This

Basically, when you select a word and drag the mouse to the left or right, once you release the second click it will press Shift+Left Click (i.e. it will select everything up to where the mouse is)

You will not see the highlighted text in real time. To achieve this you can try a script that presses Ctrl+Shift+Right/Left Arrow (select text by words) depending on where the mouse is currently and taking as reference the position of the highlighted text, to obtain those coordinates see this.

Update: I do not recommend it has a few bugs:

  • when selecting the tab it automatically double clicks
  • when selecting text or paragraphs it selects everything Maybe somebody will improve this code

Upvotes: 0

Related Questions