@@ -354,7 +354,7 @@ extension InputHandlerProtocol {
354354 }
355355
356356 // Shift + Left
357- if input. isCursorBackward, input. isShiftHold {
357+ if input. isCursorBackward, input. isShiftHeld {
358358 let moved : Bool = {
359359 if input. isHoldingAny ( [ . command, . option] ) {
360360 return ( try ? assembler. jumpCursorBySegment ( to: . rear, isMarker: true ) ) != nil
@@ -384,7 +384,7 @@ extension InputHandlerProtocol {
384384 }
385385
386386 // Shift + Right
387- if input. isCursorForward, input. isShiftHold {
387+ if input. isCursorForward, input. isShiftHeld {
388388 let moved : Bool = {
389389 if input. isHoldingAny ( [ . command, . option] ) {
390390 return ( try ? assembler. jumpCursorBySegment ( to: . front, isMarker: true ) ) != nil
@@ -517,9 +517,9 @@ extension InputHandlerProtocol {
517517 } else if readingOnly {
518518 displayedText = commissionByCtrlCommandEnter ( )
519519 } else if input. isHoldingAll ( [ . command, . control] ) {
520- displayedText = input. isOptionHold
521- ? commissionByCtrlOptionCommandEnter ( isShiftPressed: input. isShiftHold )
522- : commissionByCtrlCommandEnter ( isShiftPressed: input. isShiftHold )
520+ displayedText = input. isOptionHeld
521+ ? commissionByCtrlOptionCommandEnter ( isShiftPressed: input. isShiftHeld )
522+ : commissionByCtrlCommandEnter ( isShiftPressed: input. isShiftHeld )
523523 }
524524
525525 session. switchState ( State . ofCommitting ( textToCommit: displayedText) )
@@ -604,14 +604,14 @@ extension InputHandlerProtocol {
604604 switch prefs. specifyShiftBackSpaceKeyBehavior {
605605 case 0 :
606606 if prefs. cassetteEnabled {
607- guard input. isShiftHold , calligrapher. isEmpty else { break shiftBksp }
607+ guard input. isShiftHeld , calligrapher. isEmpty else { break shiftBksp }
608608 guard let prevReading = previousParsableCalligraph else { break shiftBksp }
609609 // 此處刻意使用 Assembler 的 API(assembler.dropKey)以避免呼叫
610610 // InputHandler 的 dropKey 中所包含的 KeyDropContext 回補邏輯。
611611 try ? assembler. dropKey ( direction: . rear)
612612 calligrapher = prevReading
613613 } else {
614- guard input. isShiftHold , isComposerOrCalligrapherEmpty else { break shiftBksp }
614+ guard input. isShiftHeld , isComposerOrCalligrapherEmpty else { break shiftBksp }
615615 guard let prevReading = previousParsableReading else { break shiftBksp }
616616 // prevReading 的內容分別是:「完整讀音」「去掉聲調的讀音」「是否有聲調」。
617617 // 此處刻意使用 Assembler 的 API(assembler.dropKey)以避免呼叫
@@ -860,7 +860,7 @@ extension InputHandlerProtocol {
860860 return true
861861 }
862862
863- if input. isShiftHold {
863+ if input. isShiftHeld {
864864 // Shift + Right
865865 if assembler. cursor < assembler. length {
866866 assembler. marker = assembler. cursor
@@ -889,8 +889,8 @@ extension InputHandlerProtocol {
889889 } else {
890890 errorCallback ? ( " BB7F6DB9 " )
891891 }
892- } else if input. isOptionHold , !input. isShiftHold {
893- if input. isControlHold {
892+ } else if input. isOptionHeld , !input. isShiftHeld {
893+ if input. isControlHeld {
894894 return handleEnd ( )
895895 }
896896 // 游標跳轉動作無論怎樣都會執行,但如果出了執行失敗的結果的話則觸發報錯流程。
@@ -926,7 +926,7 @@ extension InputHandlerProtocol {
926926 return true
927927 }
928928
929- if input. isShiftHold {
929+ if input. isShiftHeld {
930930 // Shift + left
931931 if assembler. cursor > 0 {
932932 assembler. marker = assembler. cursor
@@ -958,8 +958,8 @@ extension InputHandlerProtocol {
958958 } else {
959959 errorCallback ? ( " D326DEA3 " )
960960 }
961- } else if input. isOptionHold , !input. isShiftHold {
962- if input. isControlHold { return handleHome ( ) }
961+ } else if input. isOptionHeld , !input. isShiftHeld {
962+ if input. isControlHeld { return handleHome ( ) }
963963 // 游標跳轉動作無論怎樣都會執行,但如果出了執行失敗的結果的話則觸發報錯流程。
964964 if ( try ? assembler. jumpCursorBySegment ( to: . rear) ) == nil {
965965 errorCallback ? ( " 8D50DD9E " )
@@ -1150,7 +1150,7 @@ extension InputHandlerProtocol {
11501150
11511151 // 字母鍵摁 Shift 的話,無須額外處理,因為直接就會敲出大寫字母。
11521152 var shiftCapsLockHandling = input. isUpperCaseASCIILetterKey && session. isASCIIMode
1153- shiftCapsLockHandling = shiftCapsLockHandling || handleCapsLock && input. isShiftHold
1153+ shiftCapsLockHandling = shiftCapsLockHandling || handleCapsLock && input. isShiftHeld
11541154 guard !shiftCapsLockHandling else { return false }
11551155
11561156 // 不再讓唯音處理由 Shift 切換到的英文模式的按鍵輸入。
@@ -1177,7 +1177,7 @@ extension InputHandlerProtocol {
11771177 var state : State { session. state }
11781178 // 用上下左右鍵呼叫選字窗。
11791179 // 僅憑藉 state.hasComposition 的話,並不能真實把握組字器的狀況。
1180- // 另外,這裡不要用「!input.isFunctionKeyHold 」,
1180+ // 另外,這裡不要用「!input.isFunctionKeyHeld 」,
11811181 // 否則會導致對上下左右鍵與翻頁鍵的判斷失效。
11821182 let notEmpty = state. hasComposition && !assembler. isEmpty && isComposerOrCalligrapherEmpty
11831183 let bannedModifiers : KBEvent . ModifierFlags = [ . option, . shift, . command, . control]
@@ -1202,10 +1202,10 @@ extension InputHandlerProtocol {
12021202 func handleArabicNumeralInputs( input: InputSignalProtocol ) -> Bool {
12031203 guard let session = session else { return false }
12041204 guard session. state. type == . ofEmpty, input. isMainAreaNumKey else { return false }
1205- guard input. isOptionHold , !input. isHoldingAny ( [ . command, . control] ) else { return false }
1205+ guard input. isOptionHeld , !input. isHoldingAny ( [ . command, . control] ) else { return false }
12061206 guard let strRAW = input. mainAreaNumKeyChar else { return false }
12071207 let newString : String = {
1208- if input. isShiftHold {
1208+ if input. isShiftHeld {
12091209 return strRAW. applyingTransformFW2HW ( reverse: !prefs. halfWidthPunctuationEnabled)
12101210 }
12111211 return strRAW. applyingTransformFW2HW ( reverse: false )
@@ -1223,7 +1223,7 @@ extension InputHandlerProtocol {
12231223 guard let session = session else { return false }
12241224 let inputText = input. text
12251225 if input. isUpperCaseASCIILetterKey, !input. isHoldingAny ( [ . command, . control] ) {
1226- if input. isShiftHold { // 這裡先不要判斷 isOptionHold 。
1226+ if input. isShiftHeld { // 這裡先不要判斷 isOptionHeld 。
12271227 switch prefs. upperCaseLetterKeyBehavior {
12281228 case 1 , 3 :
12291229 if prefs. upperCaseLetterKeyBehavior == 3 , !isConsideredEmptyForNow { break }
0 commit comments