InputSignal // isESC -> isEsc.
This commit is contained in:
parent
5c6a2078b2
commit
40ad331784
|
@ -296,7 +296,7 @@ struct InputSignal: CustomStringConvertible {
|
||||||
KeyCode(rawValue: keyCode) == KeyCode.kBackSpace
|
KeyCode(rawValue: keyCode) == KeyCode.kBackSpace
|
||||||
}
|
}
|
||||||
|
|
||||||
var isESC: Bool {
|
var isEsc: Bool {
|
||||||
KeyCode(rawValue: keyCode) == KeyCode.kEscape
|
KeyCode(rawValue: keyCode) == KeyCode.kEscape
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ extension KeyHandler {
|
||||||
// MARK: 取消選字 (Cancel Candidate)
|
// MARK: 取消選字 (Cancel Candidate)
|
||||||
|
|
||||||
let cancelCandidateKey =
|
let cancelCandidateKey =
|
||||||
input.isBackSpace || input.isESC || input.isDelete
|
input.isBackSpace || input.isEsc || input.isDelete
|
||||||
|| ((input.isCursorBackward || input.isCursorForward) && input.isShiftHold)
|
|| ((input.isCursorBackward || input.isCursorForward) && input.isShiftHold)
|
||||||
|
|
||||||
if cancelCandidateKey {
|
if cancelCandidateKey {
|
||||||
|
|
|
@ -303,7 +303,7 @@ extension KeyHandler {
|
||||||
|
|
||||||
// MARK: Esc
|
// 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
|
// MARK: Tab
|
||||||
|
|
||||||
|
|
|
@ -212,7 +212,7 @@ extension KeyHandler {
|
||||||
stateCallback: @escaping (InputStateProtocol) -> Void,
|
stateCallback: @escaping (InputStateProtocol) -> Void,
|
||||||
errorCallback: @escaping () -> Void
|
errorCallback: @escaping () -> Void
|
||||||
) -> Bool {
|
) -> Bool {
|
||||||
if input.isESC {
|
if input.isEsc {
|
||||||
stateCallback(buildInputtingState)
|
stateCallback(buildInputtingState)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue