I find the default Windows method of text selection when double clicking the left mouse button annoying with its inclusion of the trailing whitespace (when it exists). It is crazy to me that the default behaviour is different when using the mouse versus the keyboard touchpad. Nonetheless, the following code eliminates that trailing whitespace reliably, but it prevents a Windows default mouse action that is desired. Specifically, I want the default action of Windows to still work when a double left mouse click and hold is done, i.e., double click anywhere on a word and hold the left mouse button allowing for the selection of that entire word as well as text that is subsequent selected by dragging.
Code: Select all
~LButton::
DoubleClickTime := DllCall("GetDoubleClickTime")
If (A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < DoubleClickTime)
{
MouseMove 3, 0, 0, R
MouseClick Left
MouseClickDrag Left, 0, 0, -1, 0, 0, R
}
return
Thank you,
Clint