diff --git a/win/ahk/ClipboardManager.ahk b/win/ahk/ClipboardManager.ahk index 14441d5..dc76c0f 100644 --- a/win/ahk/ClipboardManager.ahk +++ b/win/ahk/ClipboardManager.ahk @@ -29,13 +29,29 @@ PasteAsUnixPath() { PasteAs(convertFuncName) { %convertFuncName%() - Send ^v + Paste() Sleep 500 } +Copy() { + if WinActive("ahk_exe WindowsTerminal.exe") { + Send, ^+c + } else { + Send, ^c + } +} + +Paste() { + if WinActive("ahk_exe WindowsTerminal.exe") { + Send, ^+v + } else { + Send, ^v + } +} + CopyAndFetch() { Clipboard = - Send, ^c ; simulate Ctrl+C (=selection in clipboard) + Copy() ClipWait, 0, 1 ; wait until clipboard contains data selection = %Clipboard% ; save the content of the clipboard return selection @@ -58,3 +74,8 @@ LoadAlternativeToClipboard() { global ALTERNATIVE_CLIPBOARD Clipboard = %ALTERNATIVE_CLIPBOARD% } + +CopyClipboardToAlternative() { + global ALTERNATIVE_CLIPBOARD + ALTERNATIVE_CLIPBOARD = %ClipBoardAll% +} \ No newline at end of file diff --git a/win/win.ahk b/win/win.ahk index e226ddc..a6ab095 100644 --- a/win/win.ahk +++ b/win/win.ahk @@ -7,7 +7,7 @@ CoordMode, Mouse, Screen ; mouse coordinates relative to the screen ; ========================= ; DEBUGGING ; ========================= -global DEBUGGING := true +global DEBUGGING := false ToggleDebugging() { global DEBUGGING @@ -84,6 +84,7 @@ InitClipboardManager() ; CLIPBOARD MANAGER #c::AlternativeCopy() +#+c::CopyClipboardToAlternative() #v::AlternativePaste()