Skip to content

Instantly share code, notes, and snippets.

@OhYee
Last active January 10, 2021 07:41
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OhYee/d846828e0277a33684dc9a763d3d2ad8 to your computer and use it in GitHub Desktop.
Save OhYee/d846828e0277a33684dc9a763d3d2ad8 to your computer and use it in GitHub Desktop.
实现类Vim操作
;SpaceFn
#inputlevel,2
SetCapsLockState, AlwaysOff ; 设置大写锁定为永远为关闭状态(本脚未触发时不会起作用)
*Capslock::SetCapsLockState, AlwaysOff ; 按下 Capslock 的时候设置为永远为关闭状态
^Capslock:: ; Ctrl + Capslock 切换大写锁定状态
If GetKeyState("CapsLock", "T") = 1
SetCapsLockState, AlwaysOff
Else
SetCapsLockState, AlwaysOn
Return
#Capslock::return ;win
!Capslock::return ;alt
+Capslock::return ;shift
$Capslock::
SetMouseDelay -1
Send {Blind}{F24 DownR}
KeyWait, Capslock
Send {Blind}{F24 up}
;MsgBox, %A_ThisHotkey%-%A_TimeSinceThisHotkey%
;if(A_ThisHotkey="$Capslock" and A_TimeSinceThisHotkey<500)
; Send {Blind}{Capslock DownR}
return
#inputlevel,1
F24 & i::Up
F24 & k::Down
F24 & j::Left
F24 & l::Right
F24 & u::Home
F24 & o::End
F24 & n::PgUp
F24 & m::PgDn
F24 & 1::F1
F24 & 2::F2
F24 & 3::F3
F24 & 4::F4
F24 & 5::F5
F24 & 6::F6
F24 & 7::F7
F24 & 8::F8
F24 & 9::F9
F24 & 0::F10
F24 & -::F11
F24 & =::F12
RAlt & Enter::^Enter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment