InputSignal // isESC -> isEsc.

This commit is contained in:
ShikiSuen 2022-06-30 23:16:02 +08:00
parent 5c6a2078b2
commit 40ad331784
4 changed files with 4 additions and 4 deletions

View File

@ -296,7 +296,7 @@ struct InputSignal: CustomStringConvertible {
KeyCode(rawValue: keyCode) == KeyCode.kBackSpace
}
var isESC: Bool {
var isEsc: Bool {
KeyCode(rawValue: keyCode) == KeyCode.kEscape
}

View File

@ -55,7 +55,7 @@ extension KeyHandler {
// MARK: (Cancel Candidate)
let cancelCandidateKey =
input.isBackSpace || input.isESC || input.isDelete
input.isBackSpace || input.isEsc || input.isDelete
|| ((input.isCursorBackward || input.isCursorForward) && input.isShiftHold)
if cancelCandidateKey {

View File

@ -303,7 +303,7 @@ extension KeyHandler {
// MARK: Esc
if input.isESC { return handleEsc(state: state, stateCallback: stateCallback, errorCallback: errorCallback) }
if input.isEsc { return handleEsc(state: state, stateCallback: stateCallback, errorCallback: errorCallback) }
// MARK: Tab

View File

@ -212,7 +212,7 @@ extension KeyHandler {
stateCallback: @escaping (InputStateProtocol) -> Void,
errorCallback: @escaping () -> Void
) -> Bool {
if input.isESC {
if input.isEsc {
stateCallback(buildInputtingState)
return true
}