InputHandler // Implement Alt+BkSp features.
This commit is contained in:
parent
b7fa29e298
commit
e6e99c5205
|
@ -401,12 +401,21 @@ extension InputHandler {
|
||||||
|
|
||||||
if isCodePointInputMode {
|
if isCodePointInputMode {
|
||||||
if !strCodePointBuffer.isEmpty {
|
if !strCodePointBuffer.isEmpty {
|
||||||
strCodePointBuffer = strCodePointBuffer.dropLast(1).description
|
func refreshState() {
|
||||||
if !strCodePointBuffer.isEmpty {
|
|
||||||
var updatedState = generateStateOfInputting()
|
var updatedState = generateStateOfInputting()
|
||||||
updatedState.tooltipDuration = 0
|
updatedState.tooltipDuration = 0
|
||||||
updatedState.tooltip = tooltipCodePointInputMode
|
updatedState.tooltip = tooltipCodePointInputMode
|
||||||
delegate.switchState(updatedState)
|
delegate.switchState(updatedState)
|
||||||
|
}
|
||||||
|
strCodePointBuffer = strCodePointBuffer.dropLast(1).description
|
||||||
|
if input.modifierFlags == .option {
|
||||||
|
strCodePointBuffer.removeAll()
|
||||||
|
refreshState()
|
||||||
|
isCodePointInputMode = true
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if !strCodePointBuffer.isEmpty {
|
||||||
|
refreshState()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -460,7 +469,9 @@ extension InputHandler {
|
||||||
}
|
}
|
||||||
walk()
|
walk()
|
||||||
} else {
|
} else {
|
||||||
letComposerAndCalligrapherDoBackSpace()
|
_ = input.modifierFlags == .option
|
||||||
|
? clearComposerAndCalligrapher()
|
||||||
|
: letComposerAndCalligrapherDoBackSpace()
|
||||||
}
|
}
|
||||||
|
|
||||||
switch isConsideredEmptyForNow {
|
switch isConsideredEmptyForNow {
|
||||||
|
|
Loading…
Reference in New Issue