diff --git a/app/src/main/java/helium314/keyboard/keyboard/internal/keyboard_parser/KeyboardParser.kt b/app/src/main/java/helium314/keyboard/keyboard/internal/keyboard_parser/KeyboardParser.kt index 9b33f5e18..ed2a26ac0 100644 --- a/app/src/main/java/helium314/keyboard/keyboard/internal/keyboard_parser/KeyboardParser.kt +++ b/app/src/main/java/helium314/keyboard/keyboard/internal/keyboard_parser/KeyboardParser.kt @@ -229,13 +229,15 @@ class KeyboardParser(private val params: KeyboardParams, private val context: Co return // replace comma / period if 2 keys in normal bottom row if (baseKeys.last().size == 2) { + val newComma = baseKeys.last()[0] functionalKeysBottom.replaceFirst( { it.label == KeyLabel.COMMA || it.groupId == KeyData.GROUP_COMMA}, - { baseKeys.last()[0].copy(newGroupId = 1, newType = baseKeys.last()[0].type) } + { newComma.copy(newGroupId = 1, newType = newComma.type, newLabelFlags = it.labelFlags or newComma.labelFlags) } ) + val newPeriod = baseKeys.last()[1] functionalKeysBottom.replaceFirst( { it.label == KeyLabel.PERIOD || it.groupId == KeyData.GROUP_PERIOD}, - { baseKeys.last()[1].copy(newGroupId = 2, newType = baseKeys.last()[1].type) } + { newPeriod.copy(newGroupId = 2, newType = newPeriod.type, newLabelFlags = it.labelFlags or newPeriod.labelFlags) } ) baseKeys.removeAt(baseKeys.lastIndex) }