[bugfix] compatible with WindowsTerminal
This commit is contained in:
parent
a173351e71
commit
72a181fcf5
|
@ -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%
|
||||
}
|
|
@ -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()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user