KeyHandler // Fix a bug in Apple dynamic keyboard layouts.

This commit is contained in:
ShikiSuen 2022-09-11 23:42:05 +08:00
parent fda532a799
commit bd2000937a
1 changed files with 9 additions and 1 deletions

View File

@ -83,8 +83,16 @@ extension KeyHandler {
return false return false
} }
// macOS bug
var charToCommit = inputText.lowercased()
if "".contains(charToCommit), input.isSymbolMenuPhysicalKey,
AppleKeyboardConverter.isDynamicBasicKeyboardLayoutEnabled
{
charToCommit = "`"
}
// //
stateCallback(IMEState.ofCommitting(textToCommit: inputText.lowercased())) stateCallback(IMEState.ofCommitting(textToCommit: charToCommit))
stateCallback(IMEState.ofEmpty()) stateCallback(IMEState.ofEmpty())
return true return true