KeyParser // Rebranding to InputHandler.

- This change will solve the nomenclatural doubts brought by the previous name change.
This commit is contained in:
ShikiSuen 2022-04-18 18:25:44 +08:00
parent d188d6d36c
commit 8fc862714b
7 changed files with 15 additions and 15 deletions

View File

@ -90,7 +90,7 @@ enum CharCode: UInt /* 16 */ {
// ... but only focuses on which physical key is pressed.
}
class keyParser: NSObject {
class InputHandler: NSObject {
@objc private(set) var useVerticalMode: Bool
@objc private(set) var inputText: String?
@objc private(set) var inputTextIgnoringModifiers: String?

View File

@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#import <Foundation/Foundation.h>
@class keyParser;
@class InputHandler;
@class InputState;
NS_ASSUME_NONNULL_BEGIN

View File

@ -31,7 +31,7 @@ import Cocoa
@objc extension KeyHandler {
func _handleCandidateState(
_ state: InputState,
input: keyParser,
input: InputHandler,
stateCallback: @escaping (InputState) -> Void,
errorCallback: @escaping () -> Void
) -> Bool {

View File

@ -30,7 +30,7 @@ import Cocoa
@objc extension KeyHandler {
func handle(
input: keyParser,
input: InputHandler,
state: InputState,
stateCallback: @escaping (InputState) -> Void,
errorCallback: @escaping () -> Void

View File

@ -84,7 +84,7 @@ import Cocoa
func _handleMarkingState(
_ state: InputState.Marking,
input: keyParser,
input: InputHandler,
stateCallback: @escaping (InputState) -> Void,
errorCallback: @escaping () -> Void
) -> Bool {
@ -455,7 +455,7 @@ import Cocoa
func _handleForwardWithState(
_ state: InputState,
input: keyParser,
input: InputHandler,
stateCallback: @escaping (InputState) -> Void,
errorCallback: @escaping () -> Void
) -> Bool {
@ -506,7 +506,7 @@ import Cocoa
func _handleBackwardWithState(
_ state: InputState,
input: keyParser,
input: InputHandler,
stateCallback: @escaping (InputState) -> Void,
errorCallback: @escaping () -> Void
) -> Bool {

View File

@ -53,10 +53,10 @@ class ctlInputMethod: IMKInputController {
private var keyHandler: KeyHandler = .init()
private var state: InputState = .Empty()
// keyHandler 調 keyHandler
// KeyHandler 調 KeyHandler
// InputState ctlInputMethod
// keyHandler keyParser
// currentKeyHandler keyHandler
// keyHandler InputHandler
// currentKeyHandler KeyHandler
// currentKeyHandler
static var currentKeyHandler: KeyHandler = .init()
@objc static var currentInputMode = mgrPrefs.mostRecentInputMode
@ -178,7 +178,7 @@ class ctlInputMethod: IMKInputController {
IME.areWeUsingOurOwnPhraseEditor = false
}
let input = keyParser(event: event, isVerticalMode: useVerticalMode)
let input = InputHandler(event: event, isVerticalMode: useVerticalMode)
let result = keyHandler.handle(input: input, state: state) { newState in
self.handle(state: newState, client: client)

View File

@ -97,7 +97,7 @@
D41355DE278EA3ED005E5CBD /* UserPhrasesLM.mm in Sources */ = {isa = PBXBuildFile; fileRef = D41355DC278EA3ED005E5CBD /* UserPhrasesLM.mm */; };
D427F76C278CA2B0004A2160 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D427F76B278CA1BA004A2160 /* AppDelegate.swift */; };
D44FB74D2792189A003C80A6 /* PhraseReplacementMap.mm in Sources */ = {isa = PBXBuildFile; fileRef = D44FB74B2792189A003C80A6 /* PhraseReplacementMap.mm */; };
D456576E279E4F7B00DF6BC9 /* KeyParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = D456576D279E4F7B00DF6BC9 /* KeyParser.swift */; };
D456576E279E4F7B00DF6BC9 /* InputHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = D456576D279E4F7B00DF6BC9 /* InputHandler.swift */; };
D461B792279DAC010070E734 /* InputState.swift in Sources */ = {isa = PBXBuildFile; fileRef = D461B791279DAC010070E734 /* InputState.swift */; };
D47B92C027972AD100458394 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = D47B92BF27972AC800458394 /* main.swift */; };
D47D73AC27A6CAE600255A50 /* AssociatedPhrases.mm in Sources */ = {isa = PBXBuildFile; fileRef = D47D73AA27A6CAE600255A50 /* AssociatedPhrases.mm */; };
@ -318,7 +318,7 @@
D427F76B278CA1BA004A2160 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = AppDelegate.swift; sourceTree = "<group>"; tabWidth = 2; usesTabs = 1; };
D44FB74B2792189A003C80A6 /* PhraseReplacementMap.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = PhraseReplacementMap.mm; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
D44FB74C2792189A003C80A6 /* PhraseReplacementMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = PhraseReplacementMap.h; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
D456576D279E4F7B00DF6BC9 /* KeyParser.swift */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = KeyParser.swift; sourceTree = "<group>"; tabWidth = 2; usesTabs = 1; };
D456576D279E4F7B00DF6BC9 /* InputHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = InputHandler.swift; sourceTree = "<group>"; tabWidth = 2; usesTabs = 1; };
D461B791279DAC010070E734 /* InputState.swift */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = InputState.swift; sourceTree = "<group>"; tabWidth = 2; usesTabs = 1; };
D47B92BF27972AC800458394 /* main.swift */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = main.swift; sourceTree = "<group>"; tabWidth = 2; usesTabs = 1; };
D47D73AA27A6CAE600255A50 /* AssociatedPhrases.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = AssociatedPhrases.mm; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
@ -429,13 +429,13 @@
children = (
5B11328827B94CFB00E58451 /* AppleKeyboardConverter.swift */,
D461B791279DAC010070E734 /* InputState.swift */,
D456576D279E4F7B00DF6BC9 /* InputHandler.swift */,
D4E569DA27A34CC100AC2CEF /* KeyHandler.h */,
D4E569DB27A34CC100AC2CEF /* KeyHandler.mm */,
5B7F225C2808501000DDD3CB /* KeyHandler_HandleInput.swift */,
5B782EC3280C243C007276DE /* KeyHandler_HandleCandidate.swift */,
5B61B0C9280BEFD4002E3CFA /* KeyHandler_Misc.swift */,
5B3133BE280B229700A4A505 /* KeyHandler_States.swift */,
D456576D279E4F7B00DF6BC9 /* KeyParser.swift */,
6ACC3D3E27914F2400F1B140 /* KeyValueBlobReader.cpp */,
6ACC3D3C27914AAB00F1B140 /* KeyValueBlobReader.h */,
5B62A33727AE79CD00A19448 /* NSStringUtils.swift */,
@ -1087,7 +1087,7 @@
D47F7DD0278C0897002F9DD7 /* ctlNonModalAlertWindow.swift in Sources */,
5B62A32F27AE78B000A19448 /* CoreLM.mm in Sources */,
5BE78BE027B38804005EA1BE /* LMConsolidator.mm in Sources */,
D456576E279E4F7B00DF6BC9 /* KeyParser.swift in Sources */,
D456576E279E4F7B00DF6BC9 /* InputHandler.swift in Sources */,
5BA9FD1027FEDB6B002DE248 /* suiPrefPaneKeyboard.swift in Sources */,
5B3133BF280B229700A4A505 /* KeyHandler_States.swift in Sources */,
5BA9FD4327FEF3C8002DE248 /* Preferences.swift in Sources */,