Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to remap Shift+RButton to Shift+LButton on the mouse. Then, at the release of RButton, send Ctrl+C in order to copy my highlighted selection.

So far, the best I have come up with is this:

keywait rbutton
send {control c}

Unfortunately, it does not perform the Ctrl+C command:

Any help is appreciated.

share|improve this question

migrated from Apr 3 '13 at 9:17

This question came from our site for professional and enthusiast programmers.

I think this would be more appropriate on Superuser that on SO. – joce Apr 2 '13 at 17:00

If you are looking to copy text from the current cursor location up to the mouse location when you press Shift+RButton, then use this:

    ClipBoard = ; Clear the ClipBoard
    Send, +{lbutton} ; Send the [Shift]+[LButton]
    KeyWait, RButton ; Wait for RButton to be released
    Send, ^c ; Send [Ctrl]+c to copy the selected text to the ClipBoard
    Sleep, 50 ; ClipWait is not reliable and you need a little time for [Ctrl]+c to copy to the clipBoard.
    TrayTip, ClipBoard, %ClipBoard%, 1 ; Show the ClipBoard results
share|improve this answer

You must log in to answer this question.