有时候打错词组得需要删除再打挺麻烦,所以需要词组或者错字进行上位子对调。
源码来源网络:https://jacksautohotkeyblog.wordpress.com/2018/03/09/swapping-dyslexic-letters-a-favorite-autohotkey-trick/
无论中英文,只要光标在需要换位的地方,接着按下快捷键Ait+R,字符便左右交换了。
$!R::
OldClipboard := ClipboardAll
Clipboard := "" ; Clears the Clipboard
SendInput {Left}+{Right 2} ; Selects the two letters
SendInput, ^c
ClipWait 0 ; Pause for Clipboard data
If ErrorLevel
{
MsgBox, No text selected!
}
SwappedLetters := SubStr(Clipboard,2) . SubStr(Clipboard,1,1)
SendInput, %SwappedLetters%
SendInput {Left} ; Centers the cursor
Clipboard := OldClipboard
Return


➡
内容太粗糙,请修改后重新提交