Last active
December 20, 2021 15:51
-
-
Save 6david9/21ef0fbbdbbf56a3c7f44a3b6c267c7e to your computer and use it in GitHub Desktop.
simulate emacs nativate operations using auto hot key
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
SetCapsLockState, AlwaysOff | |
+!m::SendInput +^m | |
!s::SendInput ^s | |
!a::SendInput ^a | |
!f::SendInput ^f | |
!c::SendInput ^c | |
!x::SendInput ^x | |
!v::SendInput ^v | |
!z::SendInput ^z | |
!/::SendInput ^/ | |
!n::SendInput ^n | |
!t::SendInput ^t | |
!w::SendInput ^w | |
!l::SendInput ^l | |
^u::Goto, Deletecurrentline | |
Alt & Backspace::Goto, Deletecurrentline | |
#IF GetKeyState("CapsLock", "P") | |
Alt & f::SendInput ^{Right} | |
Alt & b::SendInput ^{Left} | |
Alt & p::SendInput ^{Home} | |
Alt & n::SendInput ^{End} | |
return | |
#IF GetKeyState("CapsLock", "P") | |
a::SendInput {Home} | |
e::SendInput {End} | |
b::SendInput {Left} | |
f::SendInput {Right} | |
p::SendInput {Up} | |
n::SendInput {Down} | |
h::SendInput {Backspace} | |
Backspace::SendInput ^{Backspace} | |
d::SendInput {Delete} | |
l::SendInput ^l | |
w::Goto, DeleteWord | |
u::Goto, DeleteCurrentLine | |
return | |
DeleteWord: | |
SendInput ^{Backspace} | |
return | |
DeleteCurrentLine: | |
SendInput {End} | |
SendInput {Shift Down}{Home}{Shift Up} | |
SendInput {Delete} | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment