InputHandler // Do handleBackSpace() correctly with `%quick`.
This commit is contained in:
parent
28db2c8e7c
commit
f7872810ad
|
@ -49,6 +49,12 @@ extension InputHandler {
|
|||
}
|
||||
}
|
||||
|
||||
// MARK: 簡碼候選時對 BackSpace 的特殊處理
|
||||
|
||||
if input.isBackSpace, prefs.cassetteEnabled, state.type == .ofInputting {
|
||||
return handleBackSpace(input: input)
|
||||
}
|
||||
|
||||
// MARK: 取消選字 (Cancel Candidate)
|
||||
|
||||
let cancelCandidateKey =
|
||||
|
|
|
@ -503,7 +503,15 @@ extension InputHandler {
|
|||
}
|
||||
|
||||
switch isConsideredEmptyForNow {
|
||||
case false: delegate.switchState(generateStateOfInputting())
|
||||
case false:
|
||||
var result = generateStateOfInputting()
|
||||
// 針對 IMK 選字窗停用 `%quick` 特性,因為按鍵邏輯實在難以實作。
|
||||
if prefs.cassetteEnabled, !prefs.useIMKCandidateWindow,
|
||||
let fetched = currentLM.cassetteQuickSetsFor(key: calligrapher)
|
||||
{
|
||||
result.candidates = fetched.map { (keyArray: [""], value: $0.description) }
|
||||
}
|
||||
delegate.switchState(result)
|
||||
case true: delegate.switchState(IMEState.ofAbortion())
|
||||
}
|
||||
return true
|
||||
|
|
Loading…
Reference in New Issue