I would like to have a script in AutoHotkey that allows me to do the following:
When I hit Control + Space: It would initiate "text selection mode" (i.e. if I move the cursor with the arrow keys, or moving the mouse it will highlight text)
When I hit Control + Space again: It would terminate "text selection mode" (e.g. if I move the cursor with the arrow keys or moving the mouse it will not highlight text)
However I would like to avoid using the following strategies, for the reasons explained below:
Strategy 1:
The following script does not let me move the cursor with the keyboard after I initiate text selection. Apparently the computer believes that I am constantly clicking on the mouse location, so it does not let me move the cursor with the keyboard.
*^Space::
text_selection_is_on := !text_selection_is_on
if text_selection_is_on
Send, {Click down}
else
Send, {Click up}
return
Strategy 2:
The following script relies on simulating the action of pressing the shift key down to initiate text selection. However, I would like to avoid relying on the shift key since some of the programs that I plan on using this script with require the shift key to be up (i.e. not pressed) when I move the cursor to select text.
*^Space::
text_selection_is_on := !text_selection_is_on
if text_selection_is_on
Send, {Shift down}
else
Send, {Shift up}
return
Is it possible to do this with AutoHotkey? If so, how?
Thanks!