tiancheng91 / collection

笔记
https://github.com/tiancheng91/collection/issues
21 stars 1 forks source link

ahk #40

Open tiancheng91 opened 4 years ago

tiancheng91 commented 4 years ago
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #InstallKeybdHook
; #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.

; CapsLock开关: CapsLock + ` 
CapsLock & `::                                                       ;|
GetKeyState, CapsLockState, CapsLock, T                              ;|
if CapsLockState = D                                                 ;|
    SetCapsLockState, AlwaysOff                                      ;|
else                                                                 ;|
    SetCapsLockState, AlwaysOn                                       ;|
KeyWait, ``                                                          ;|
return               

; 修饰键
; #: Win
; !: Alt
; ^: Control
; +: Shift
; &: 组合任意两个按键
; ~: 触发热键时,不屏蔽原有功能
; ~RButton::MsgBox You clicked the right mouse button.

CapsLock & z:: Send, ^z
CapsLock & x:: Send, ^x
CapsLock & c:: Send, ^c
CapsLock & v:: Send, ^v
CapsLock & a:: Send, ^a

CapsLock & w:: Send, ^w
CapsLock & n:: Send, ^n  
CapsLock & t:: Send, ^t

; patch 64 key
+Esc:: SendRaw, ~