Skip to content

Commit

Permalink
fix: #39
Browse files Browse the repository at this point in the history
  • Loading branch information
snomiao committed Apr 20, 2022
1 parent 948bd45 commit b8606ee
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Core/CapslockX-Core.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,13 @@ CapsLockX_Dn()
模式:
普通模式 + 按住CLX -> CLX模式
普通模式 + 长按CLX -> CLX锁定模式
普通模式 + 同时按下 -> CLX锁定模式
普通模式 + (CLX+SPACE) -> CLX锁定模式
CLX模式 + 弹起CLX -> 普通模式
CLX锁定模式 + 按住CLX -> CLX模式
CapsLock + Space 同时按下:进入CLX模式
CLX长按:进入CLX模式
CLX单击:退出CLX模式
CLX长按:进入CLX锁定模式
CLX单击:退出CLX锁定模式
*/
; 按住其它键的时候 不触发 CapsLockX 避免影响打字
Expand All @@ -265,7 +265,9 @@ CapsLockX_Dn()
CapsLockQ := 触发键 == "CapsLock"
ModifierQ := InStr("LControl|RControl|LShift|RShift|LAlt|RAlt|LWin|RWin", A_PriorKey)
ModifierEnableQ := !SpaceQ && ModifierQ
if ((A_PriorKey == "CapsLock" && 触发键 == "Space") || (触发键 == "CapsLock" && A_PriorKey == "Space" )) {

CLX_AND_SPACE_Q := (A_PriorKey == "CapsLock" && 触发键 == "Space") || (触发键 == "CapsLock" && A_PriorKey == "Space" )
if (CLX_AND_SPACE_Q && A_TimeSincePriorHotkey < 250) {
; CapsLockX_ModeEnter()
CapsLockXMode |= CM_CapsLockX
UpdateCapsLockXLight()
Expand Down

0 comments on commit b8606ee

Please sign in to comment.