Friday, February 13, 2015

#AHK Swap ctrl with ALT and highlight to copy text

Here is a nice Autohotkey command to set up the  and swap ctrl with ALT and highlight to copy text.

Copy with highlight because I worked with terminal a lot and had to manually copy and paste into the terminal.
If I do not want the highlight to copy the items, just kill the ahk process from the taskbar, and life is normal again! Note that it is only effective to the highlights by the left click and drag. Not the shift and arrow highlights.

To activate the ahk script, save the script as alt-ctrl-mouse.ahk. Install AHK software, then drag the script file to startup folder inside the start menu. The script will be activated when you log in.

; Switches the left Control and Alt keys.

LCtrl::Alt

LAlt::Ctrl
; code below are used to copy the mouse-highlighted items.
 
~$LButton Up::
{
 Send ^c
    Sleep 2
}
return

No comments: