From 4197b1bf04160ecb3b8edc98b80926317e6c3899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alen=20=C5=A0iljak?= Date: Sat, 6 Jan 2024 21:36:43 +0100 Subject: [PATCH 1/2] double symbols prototype --- .../thumbkey/keyboards/CommonKeys.kt | 1 + .../thumbkey/keyboards/DoubleNumeric.kt | 661 +++++++ .../thumbkey/keyboards/ENDoubleSymbols.kt | 1731 +++++++++++++++++ .../thumbkey/utils/KeyboardLayout.kt | 2 + 4 files changed, 2395 insertions(+) create mode 100644 app/src/main/java/com/dessalines/thumbkey/keyboards/DoubleNumeric.kt create mode 100644 app/src/main/java/com/dessalines/thumbkey/keyboards/ENDoubleSymbols.kt diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/CommonKeys.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/CommonKeys.kt index 6dc2cf150..6a60c8f65 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/CommonKeys.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/CommonKeys.kt @@ -245,6 +245,7 @@ val SPACEBAR_KEY_ITEM = widthMultiplier = 3, ) val SPACEBAR_SKINNY_KEY_ITEM = SPACEBAR_KEY_ITEM.copy(widthMultiplier = 1) +val SPACEBAR_DOUBLE_KEY_ITEM = SPACEBAR_KEY_ITEM.copy(widthMultiplier = 2) val SPACEBAR_PROGRAMMER_KEY_ITEM = KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/DoubleNumeric.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/DoubleNumeric.kt new file mode 100644 index 000000000..4479eb788 --- /dev/null +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/DoubleNumeric.kt @@ -0,0 +1,661 @@ +package com.dessalines.thumbkey.keyboards + +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.outlined.Abc +import com.dessalines.thumbkey.utils.ColorVariant +import com.dessalines.thumbkey.utils.FontSizeVariant +import com.dessalines.thumbkey.utils.KeyAction +import com.dessalines.thumbkey.utils.KeyC +import com.dessalines.thumbkey.utils.KeyDisplay +import com.dessalines.thumbkey.utils.KeyItemC +import com.dessalines.thumbkey.utils.KeyboardC +import com.dessalines.thumbkey.utils.SwipeDirection + +val DOUBLE_NUMERIC_KEYBOARD = + KeyboardC( + listOf( + listOf( + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("1"), + action = KeyAction.CommitText("1"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("$"), + action = KeyAction.CommitText("$"), + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("2"), + action = KeyAction.CommitText("2"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("`"), + action = KeyAction.CommitText("`"), + ), + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.TextDisplay("^"), + action = KeyAction.CommitText("^"), + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("´"), + action = KeyAction.CommitText("´"), + ), + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("!"), + action = KeyAction.CommitText("!"), + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("\\"), + action = KeyAction.CommitText("\\"), + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("/"), + action = KeyAction.CommitText("/"), + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("+"), + action = KeyAction.CommitText("+"), + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("3"), + action = KeyAction.CommitText("3"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("?"), + action = KeyAction.CommitText("?"), + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("€"), + action = KeyAction.CommitText("€"), + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("£"), + action = KeyAction.CommitText("£"), + ), + SwipeDirection.BOTTOM to + KeyC( + display = KeyDisplay.TextDisplay("="), + action = KeyAction.CommitText("="), + ), + ), + ), + EMOJI_KEY_ITEM, + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("1"), + action = KeyAction.CommitText("1"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("$"), + action = KeyAction.CommitText("$"), + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("2"), + action = KeyAction.CommitText("2"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("`"), + action = KeyAction.CommitText("`"), + ), + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.TextDisplay("^"), + action = KeyAction.CommitText("^"), + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("´"), + action = KeyAction.CommitText("´"), + ), + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("!"), + action = KeyAction.CommitText("!"), + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("\\"), + action = KeyAction.CommitText("\\"), + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("/"), + action = KeyAction.CommitText("/"), + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("+"), + action = KeyAction.CommitText("+"), + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("3"), + action = KeyAction.CommitText("3"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("?"), + action = KeyAction.CommitText("?"), + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("€"), + action = KeyAction.CommitText("€"), + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("£"), + action = KeyAction.CommitText("£"), + ), + SwipeDirection.BOTTOM to + KeyC( + display = KeyDisplay.TextDisplay("="), + action = KeyAction.CommitText("="), + ), + ), + ), + ), + listOf( + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("4"), + action = KeyAction.CommitText("4"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("{"), + action = KeyAction.CommitText("{"), + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("%"), + action = KeyAction.CommitText("%"), + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("_"), + action = KeyAction.CommitText("_"), + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("["), + action = KeyAction.CommitText("["), + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("("), + action = KeyAction.CommitText("("), + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("5"), + action = KeyAction.CommitText("5"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("6"), + action = KeyAction.CommitText("6"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("|"), + action = KeyAction.CommitText("|"), + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("}"), + action = KeyAction.CommitText("}"), + ), + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay(")"), + action = KeyAction.CommitText(")"), + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("]"), + action = KeyAction.CommitText("]"), + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("@"), + action = KeyAction.CommitText("@"), + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.IconDisplay(Icons.Outlined.Abc), + action = KeyAction.ToggleNumericMode(false), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + backgroundColor = ColorVariant.SURFACE_VARIANT, + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("4"), + action = KeyAction.CommitText("4"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("{"), + action = KeyAction.CommitText("{"), + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("%"), + action = KeyAction.CommitText("%"), + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("_"), + action = KeyAction.CommitText("_"), + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("["), + action = KeyAction.CommitText("["), + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("("), + action = KeyAction.CommitText("("), + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("5"), + action = KeyAction.CommitText("5"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("6"), + action = KeyAction.CommitText("6"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("|"), + action = KeyAction.CommitText("|"), + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("}"), + action = KeyAction.CommitText("}"), + ), + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay(")"), + action = KeyAction.CommitText(")"), + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("]"), + action = KeyAction.CommitText("]"), + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("@"), + action = KeyAction.CommitText("@"), + ), + ), + ), + ), + listOf( + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("7"), + action = KeyAction.CommitText("7"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("~"), + action = KeyAction.CommitText("~"), + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay(":"), + action = KeyAction.CommitText(":"), + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("<"), + action = KeyAction.CommitText("<"), + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("8"), + action = KeyAction.CommitText("8"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("\""), + action = KeyAction.CommitText("\""), + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("'"), + action = KeyAction.CommitText("'"), + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("-"), + action = KeyAction.CommitText("-"), + ), + SwipeDirection.BOTTOM to + KeyC( + display = KeyDisplay.TextDisplay("."), + action = KeyAction.CommitText("."), + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("*"), + action = KeyAction.CommitText("*"), + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay(","), + action = KeyAction.CommitText(","), + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("9"), + action = KeyAction.CommitText("9"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.TextDisplay("&"), + action = KeyAction.CommitText("&"), + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("°"), + action = KeyAction.CommitText("°"), + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay(">"), + action = KeyAction.CommitText(">"), + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay(";"), + action = KeyAction.CommitText(";"), + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("#"), + action = KeyAction.CommitText("#"), + ), + ), + ), + BACKSPACE_KEY_ITEM, + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("7"), + action = KeyAction.CommitText("7"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("~"), + action = KeyAction.CommitText("~"), + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay(":"), + action = KeyAction.CommitText(":"), + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("<"), + action = KeyAction.CommitText("<"), + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("8"), + action = KeyAction.CommitText("8"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("\""), + action = KeyAction.CommitText("\""), + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("'"), + action = KeyAction.CommitText("'"), + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("-"), + action = KeyAction.CommitText("-"), + ), + SwipeDirection.BOTTOM to + KeyC( + display = KeyDisplay.TextDisplay("."), + action = KeyAction.CommitText("."), + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("*"), + action = KeyAction.CommitText("*"), + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay(","), + action = KeyAction.CommitText(","), + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("9"), + action = KeyAction.CommitText("9"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.TextDisplay("&"), + action = KeyAction.CommitText("&"), + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("°"), + action = KeyAction.CommitText("°"), + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay(">"), + action = KeyAction.CommitText(">"), + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay(";"), + action = KeyAction.CommitText(";"), + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("#"), + action = KeyAction.CommitText("#"), + ), + ), + ), + ), + listOf( + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("0"), + action = KeyAction.CommitText("0"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + widthMultiplier = 2, + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay(" "), + action = KeyAction.CommitText(" "), + ), + nextTapActions = + listOf( + KeyAction.ReplaceLastText(". ", trimCount = 1), + KeyAction.ReplaceLastText(", "), + KeyAction.ReplaceLastText("? "), + KeyAction.ReplaceLastText("! "), + KeyAction.ReplaceLastText(": "), + ), + backgroundColor = ColorVariant.SURFACE_VARIANT, + ), + RETURN_KEY_ITEM, + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("0"), + action = KeyAction.CommitText("0"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + widthMultiplier = 2, + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay(" "), + action = KeyAction.CommitText(" "), + ), + nextTapActions = + listOf( + KeyAction.ReplaceLastText(". ", trimCount = 1), + KeyAction.ReplaceLastText(", "), + KeyAction.ReplaceLastText("? "), + KeyAction.ReplaceLastText("! "), + KeyAction.ReplaceLastText(": "), + ), + backgroundColor = ColorVariant.SURFACE_VARIANT, + ), + ), + ), + ) diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ENDoubleSymbols.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ENDoubleSymbols.kt new file mode 100644 index 000000000..a262c5b20 --- /dev/null +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ENDoubleSymbols.kt @@ -0,0 +1,1731 @@ +package com.dessalines.thumbkey.keyboards + +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.outlined.ArrowDropDown +import androidx.compose.material.icons.outlined.ArrowDropUp +import androidx.compose.material.icons.outlined.KeyboardCapslock +import com.dessalines.thumbkey.utils.ColorVariant +import com.dessalines.thumbkey.utils.FontSizeVariant +import com.dessalines.thumbkey.utils.KeyAction +import com.dessalines.thumbkey.utils.KeyC +import com.dessalines.thumbkey.utils.KeyDisplay +import com.dessalines.thumbkey.utils.KeyItemC +import com.dessalines.thumbkey.utils.KeyboardC +import com.dessalines.thumbkey.utils.KeyboardDefinition +import com.dessalines.thumbkey.utils.KeyboardDefinitionModes +import com.dessalines.thumbkey.utils.KeyboardDefinitionSettings +import com.dessalines.thumbkey.utils.SwipeDirection +import com.dessalines.thumbkey.utils.SwipeNWay +import com.dessalines.thumbkey.utils.autoCapitalizeI +import com.dessalines.thumbkey.utils.autoCapitalizeIApostrophe + +val KB_EN_DOUBLE_SYMBOLS_MAIN = + KeyboardC( + listOf( + listOf( + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("s"), + action = KeyAction.CommitText("s"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipeType = SwipeNWay.FOUR_WAY_DIAGONAL, + swipes = + mapOf( + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("w"), + action = KeyAction.CommitText("w"), + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("$"), + action = KeyAction.CommitText("$"), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("r"), + action = KeyAction.CommitText("r"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.BOTTOM to + KeyC( + display = KeyDisplay.TextDisplay("g"), + action = KeyAction.CommitText("g"), + ), + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("`"), + action = KeyAction.CommitText("`"), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.TextDisplay("^"), + action = KeyAction.CommitText("^"), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("´"), + action = KeyAction.CommitText("´"), + color = ColorVariant.MUTED, + ), + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("!"), + action = KeyAction.CommitText("!"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("\\"), + action = KeyAction.CommitText("\\"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("/"), + action = KeyAction.CommitText("/"), + color = ColorVariant.MUTED, + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("+"), + action = KeyAction.CommitText("+"), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("o"), + action = KeyAction.CommitText("o"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("u"), + action = KeyAction.CommitText("u"), + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("?"), + action = KeyAction.CommitText("?"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("€"), + action = KeyAction.CommitText("€"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM to + KeyC( + display = KeyDisplay.TextDisplay("="), + action = KeyAction.CommitText("="), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("s"), + action = KeyAction.CommitText("s"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipeType = SwipeNWay.FOUR_WAY_DIAGONAL, + swipes = + mapOf( + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("w"), + action = KeyAction.CommitText("w"), + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("$"), + action = KeyAction.CommitText("$"), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("r"), + action = KeyAction.CommitText("r"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.BOTTOM to + KeyC( + display = KeyDisplay.TextDisplay("g"), + action = KeyAction.CommitText("g"), + ), + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("`"), + action = KeyAction.CommitText("`"), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.TextDisplay("^"), + action = KeyAction.CommitText("^"), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("´"), + action = KeyAction.CommitText("´"), + color = ColorVariant.MUTED, + ), + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("!"), + action = KeyAction.CommitText("!"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("\\"), + action = KeyAction.CommitText("\\"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("/"), + action = KeyAction.CommitText("/"), + color = ColorVariant.MUTED, + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("+"), + action = KeyAction.CommitText("+"), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("o"), + action = KeyAction.CommitText("o"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("u"), + action = KeyAction.CommitText("u"), + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("?"), + action = KeyAction.CommitText("?"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("€"), + action = KeyAction.CommitText("€"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM to + KeyC( + display = KeyDisplay.TextDisplay("="), + action = KeyAction.CommitText("="), + color = ColorVariant.MUTED, + ), + ), + ), + ), + listOf( + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("n"), + action = KeyAction.CommitText("n"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("m"), + action = KeyAction.CommitText("m"), + ), + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("{"), + action = KeyAction.CommitText("{"), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("%"), + action = KeyAction.CommitText("%"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("_"), + action = KeyAction.CommitText("_"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("["), + action = KeyAction.CommitText("["), + color = ColorVariant.MUTED, + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("("), + action = KeyAction.CommitText("("), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("h"), + action = KeyAction.CommitText("h"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("j"), + action = KeyAction.CommitText("j"), + ), + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.TextDisplay("q"), + action = KeyAction.CommitText("q"), + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("b"), + action = KeyAction.CommitText("b"), + ), + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("p"), + action = KeyAction.CommitText("p"), + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("y"), + action = KeyAction.CommitText("y"), + ), + SwipeDirection.BOTTOM to + KeyC( + display = KeyDisplay.TextDisplay("x"), + action = KeyAction.CommitText("x"), + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("v"), + action = KeyAction.CommitText("v"), + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("k"), + action = KeyAction.CommitText("k"), + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("a"), + action = KeyAction.CommitText("a"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("l"), + action = KeyAction.CommitText("l"), + ), + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.IconDisplay(Icons.Outlined.ArrowDropUp), + action = KeyAction.ToggleShiftMode(true), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("|"), + action = KeyAction.CommitText("|"), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("}"), + action = KeyAction.CommitText("}"), + color = ColorVariant.MUTED, + ), + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay(")"), + action = KeyAction.CommitText(")"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("]"), + action = KeyAction.CommitText("]"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("@"), + action = KeyAction.CommitText("@"), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("n"), + action = KeyAction.CommitText("n"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("m"), + action = KeyAction.CommitText("m"), + ), + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("{"), + action = KeyAction.CommitText("{"), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("%"), + action = KeyAction.CommitText("%"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("_"), + action = KeyAction.CommitText("_"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("["), + action = KeyAction.CommitText("["), + color = ColorVariant.MUTED, + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("("), + action = KeyAction.CommitText("("), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("h"), + action = KeyAction.CommitText("h"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("j"), + action = KeyAction.CommitText("j"), + ), + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.TextDisplay("q"), + action = KeyAction.CommitText("q"), + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("b"), + action = KeyAction.CommitText("b"), + ), + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("p"), + action = KeyAction.CommitText("p"), + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("y"), + action = KeyAction.CommitText("y"), + ), + SwipeDirection.BOTTOM to + KeyC( + display = KeyDisplay.TextDisplay("x"), + action = KeyAction.CommitText("x"), + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("v"), + action = KeyAction.CommitText("v"), + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("k"), + action = KeyAction.CommitText("k"), + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("a"), + action = KeyAction.CommitText("a"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("l"), + action = KeyAction.CommitText("l"), + ), + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.IconDisplay(Icons.Outlined.ArrowDropUp), + action = KeyAction.ToggleShiftMode(true), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("|"), + action = KeyAction.CommitText("|"), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("}"), + action = KeyAction.CommitText("}"), + color = ColorVariant.MUTED, + ), + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay(")"), + action = KeyAction.CommitText(")"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("]"), + action = KeyAction.CommitText("]"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("@"), + action = KeyAction.CommitText("@"), + color = ColorVariant.MUTED, + ), + ), + ), + ), + listOf( + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("t"), + action = KeyAction.CommitText("t"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipeType = SwipeNWay.FOUR_WAY_DIAGONAL, + swipes = + mapOf( + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("c"), + action = KeyAction.CommitText("c"), + ), + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("~"), + action = KeyAction.CommitText("~"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay(":"), + action = KeyAction.CommitText(":"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("<"), + action = KeyAction.CommitText("<"), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("i"), + action = KeyAction.CommitText("i"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.TextDisplay("f"), + action = KeyAction.CommitText("f"), + ), + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("z"), + action = KeyAction.CommitText("z"), + ), + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("\""), + action = KeyAction.CommitText("\""), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("'"), + action = KeyAction.CommitText("'"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("-"), + action = KeyAction.CommitText("-"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM to + KeyC( + display = KeyDisplay.TextDisplay("."), + action = KeyAction.CommitText("."), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("*"), + action = KeyAction.CommitText("*"), + color = ColorVariant.MUTED, + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay(","), + action = KeyAction.CommitText(","), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("e"), + action = KeyAction.CommitText("e"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("d"), + action = KeyAction.CommitText("d"), + ), + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.TextDisplay("&"), + action = KeyAction.CommitText("&"), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("°"), + action = KeyAction.CommitText("°"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay(">"), + action = KeyAction.CommitText(">"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay(";"), + action = KeyAction.CommitText(";"), + color = ColorVariant.MUTED, + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("#"), + action = KeyAction.CommitText("#"), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("t"), + action = KeyAction.CommitText("t"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipeType = SwipeNWay.FOUR_WAY_DIAGONAL, + swipes = + mapOf( + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("c"), + action = KeyAction.CommitText("c"), + ), + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("~"), + action = KeyAction.CommitText("~"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay(":"), + action = KeyAction.CommitText(":"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("<"), + action = KeyAction.CommitText("<"), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("i"), + action = KeyAction.CommitText("i"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.TextDisplay("f"), + action = KeyAction.CommitText("f"), + ), + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("z"), + action = KeyAction.CommitText("z"), + ), + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("\""), + action = KeyAction.CommitText("\""), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("'"), + action = KeyAction.CommitText("'"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("-"), + action = KeyAction.CommitText("-"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM to + KeyC( + display = KeyDisplay.TextDisplay("."), + action = KeyAction.CommitText("."), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("*"), + action = KeyAction.CommitText("*"), + color = ColorVariant.MUTED, + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay(","), + action = KeyAction.CommitText(","), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("e"), + action = KeyAction.CommitText("e"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("d"), + action = KeyAction.CommitText("d"), + ), + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.TextDisplay("&"), + action = KeyAction.CommitText("&"), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("°"), + action = KeyAction.CommitText("°"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay(">"), + action = KeyAction.CommitText(">"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay(";"), + action = KeyAction.CommitText(";"), + color = ColorVariant.MUTED, + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("#"), + action = KeyAction.CommitText("#"), + color = ColorVariant.MUTED, + ), + ), + ), + ), + listOf( + EMOJI_KEY_ITEM, + BACKSPACE_KEY_ITEM, + SPACEBAR_KEY_ITEM, + NUMERIC_KEY_ITEM, + RETURN_KEY_ITEM, + ), + ), + ) + +val KB_EN_DOUBLE_SYMBOLS_SHIFTED = + KeyboardC( + listOf( + listOf( + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("S"), + action = KeyAction.CommitText("S"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipeType = SwipeNWay.FOUR_WAY_DIAGONAL, + swipes = + mapOf( + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("W"), + action = KeyAction.CommitText("W"), + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("$"), + action = KeyAction.CommitText("$"), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("R"), + action = KeyAction.CommitText("R"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.BOTTOM to + KeyC( + display = KeyDisplay.TextDisplay("G"), + action = KeyAction.CommitText("G"), + ), + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("`"), + action = KeyAction.CommitText("`"), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.TextDisplay("^"), + action = KeyAction.CommitText("^"), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("´"), + action = KeyAction.CommitText("´"), + color = ColorVariant.MUTED, + ), + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("!"), + action = KeyAction.CommitText("!"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("\\"), + action = KeyAction.CommitText("\\"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("/"), + action = KeyAction.CommitText("/"), + color = ColorVariant.MUTED, + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("+"), + action = KeyAction.CommitText("+"), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("O"), + action = KeyAction.CommitText("O"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("U"), + action = KeyAction.CommitText("U"), + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("?"), + action = KeyAction.CommitText("?"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("€"), + action = KeyAction.CommitText("€"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM to + KeyC( + display = KeyDisplay.TextDisplay("="), + action = KeyAction.CommitText("="), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("S"), + action = KeyAction.CommitText("S"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipeType = SwipeNWay.FOUR_WAY_DIAGONAL, + swipes = + mapOf( + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("W"), + action = KeyAction.CommitText("W"), + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("$"), + action = KeyAction.CommitText("$"), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("R"), + action = KeyAction.CommitText("R"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.BOTTOM to + KeyC( + display = KeyDisplay.TextDisplay("G"), + action = KeyAction.CommitText("G"), + ), + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("`"), + action = KeyAction.CommitText("`"), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.TextDisplay("^"), + action = KeyAction.CommitText("^"), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("´"), + action = KeyAction.CommitText("´"), + color = ColorVariant.MUTED, + ), + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("!"), + action = KeyAction.CommitText("!"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("\\"), + action = KeyAction.CommitText("\\"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("/"), + action = KeyAction.CommitText("/"), + color = ColorVariant.MUTED, + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("+"), + action = KeyAction.CommitText("+"), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("O"), + action = KeyAction.CommitText("O"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("U"), + action = KeyAction.CommitText("U"), + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("?"), + action = KeyAction.CommitText("?"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("€"), + action = KeyAction.CommitText("€"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM to + KeyC( + display = KeyDisplay.TextDisplay("="), + action = KeyAction.CommitText("="), + color = ColorVariant.MUTED, + ), + ), + ), + ), + listOf( + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("N"), + action = KeyAction.CommitText("N"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("M"), + action = KeyAction.CommitText("M"), + ), + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("{"), + action = KeyAction.CommitText("{"), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("%"), + action = KeyAction.CommitText("%"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("_"), + action = KeyAction.CommitText("_"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("["), + action = KeyAction.CommitText("["), + color = ColorVariant.MUTED, + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("("), + action = KeyAction.CommitText("("), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("H"), + action = KeyAction.CommitText("H"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("J"), + action = KeyAction.CommitText("J"), + ), + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.TextDisplay("Q"), + action = KeyAction.CommitText("Q"), + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("B"), + action = KeyAction.CommitText("B"), + ), + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("P"), + action = KeyAction.CommitText("P"), + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("Y"), + action = KeyAction.CommitText("Y"), + ), + SwipeDirection.BOTTOM to + KeyC( + display = KeyDisplay.TextDisplay("X"), + action = KeyAction.CommitText("X"), + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("V"), + action = KeyAction.CommitText("V"), + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("K"), + action = KeyAction.CommitText("K"), + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("A"), + action = KeyAction.CommitText("A"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("L"), + action = KeyAction.CommitText("L"), + ), + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.IconDisplay(Icons.Outlined.KeyboardCapslock), + capsModeDisplay = KeyDisplay.IconDisplay(Icons.Outlined.ArrowDropUp), + action = KeyAction.ToggleCapsLock, + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM to + KeyC( + display = KeyDisplay.IconDisplay(Icons.Outlined.ArrowDropDown), + action = KeyAction.ToggleShiftMode(false), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("|"), + action = KeyAction.CommitText("|"), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("}"), + action = KeyAction.CommitText("}"), + color = ColorVariant.MUTED, + ), + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay(")"), + action = KeyAction.CommitText(")"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("]"), + action = KeyAction.CommitText("]"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("@"), + action = KeyAction.CommitText("@"), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("N"), + action = KeyAction.CommitText("N"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("M"), + action = KeyAction.CommitText("M"), + ), + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("{"), + action = KeyAction.CommitText("{"), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("%"), + action = KeyAction.CommitText("%"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("_"), + action = KeyAction.CommitText("_"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("["), + action = KeyAction.CommitText("["), + color = ColorVariant.MUTED, + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("("), + action = KeyAction.CommitText("("), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("H"), + action = KeyAction.CommitText("H"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("J"), + action = KeyAction.CommitText("J"), + ), + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.TextDisplay("Q"), + action = KeyAction.CommitText("Q"), + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("B"), + action = KeyAction.CommitText("B"), + ), + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("P"), + action = KeyAction.CommitText("P"), + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("Y"), + action = KeyAction.CommitText("Y"), + ), + SwipeDirection.BOTTOM to + KeyC( + display = KeyDisplay.TextDisplay("X"), + action = KeyAction.CommitText("X"), + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("V"), + action = KeyAction.CommitText("V"), + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("K"), + action = KeyAction.CommitText("K"), + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("A"), + action = KeyAction.CommitText("A"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("L"), + action = KeyAction.CommitText("L"), + ), + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.IconDisplay(Icons.Outlined.KeyboardCapslock), + capsModeDisplay = KeyDisplay.IconDisplay(Icons.Outlined.ArrowDropUp), + action = KeyAction.ToggleCapsLock, + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM to + KeyC( + display = KeyDisplay.IconDisplay(Icons.Outlined.ArrowDropDown), + action = KeyAction.ToggleShiftMode(false), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("|"), + action = KeyAction.CommitText("|"), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("}"), + action = KeyAction.CommitText("}"), + color = ColorVariant.MUTED, + ), + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay(")"), + action = KeyAction.CommitText(")"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("]"), + action = KeyAction.CommitText("]"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("@"), + action = KeyAction.CommitText("@"), + color = ColorVariant.MUTED, + ), + ), + ), + ), + listOf( + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("T"), + action = KeyAction.CommitText("T"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipeType = SwipeNWay.FOUR_WAY_DIAGONAL, + swipes = + mapOf( + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("C"), + action = KeyAction.CommitText("C"), + ), + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("~"), + action = KeyAction.CommitText("~"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay(":"), + action = KeyAction.CommitText(":"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("<"), + action = KeyAction.CommitText("<"), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("I"), + action = KeyAction.CommitText("I"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.TextDisplay("F"), + action = KeyAction.CommitText("F"), + ), + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("Z"), + action = KeyAction.CommitText("Z"), + ), + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("\""), + action = KeyAction.CommitText("\""), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("'"), + action = KeyAction.CommitText("'"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("-"), + action = KeyAction.CommitText("-"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM to + KeyC( + display = KeyDisplay.TextDisplay("."), + action = KeyAction.CommitText("."), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("*"), + action = KeyAction.CommitText("*"), + color = ColorVariant.MUTED, + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay(","), + action = KeyAction.CommitText(","), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("E"), + action = KeyAction.CommitText("E"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("D"), + action = KeyAction.CommitText("D"), + ), + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.TextDisplay("&"), + action = KeyAction.CommitText("&"), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("°"), + action = KeyAction.CommitText("°"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay(">"), + action = KeyAction.CommitText(">"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay(";"), + action = KeyAction.CommitText(";"), + color = ColorVariant.MUTED, + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("#"), + action = KeyAction.CommitText("#"), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("T"), + action = KeyAction.CommitText("T"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipeType = SwipeNWay.FOUR_WAY_DIAGONAL, + swipes = + mapOf( + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("C"), + action = KeyAction.CommitText("C"), + ), + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("~"), + action = KeyAction.CommitText("~"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay(":"), + action = KeyAction.CommitText(":"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("<"), + action = KeyAction.CommitText("<"), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("I"), + action = KeyAction.CommitText("I"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.TextDisplay("F"), + action = KeyAction.CommitText("F"), + ), + SwipeDirection.RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("Z"), + action = KeyAction.CommitText("Z"), + ), + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("\""), + action = KeyAction.CommitText("\""), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("'"), + action = KeyAction.CommitText("'"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("-"), + action = KeyAction.CommitText("-"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM to + KeyC( + display = KeyDisplay.TextDisplay("."), + action = KeyAction.CommitText("."), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("*"), + action = KeyAction.CommitText("*"), + color = ColorVariant.MUTED, + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay(","), + action = KeyAction.CommitText(","), + color = ColorVariant.MUTED, + ), + ), + ), + KeyItemC( + center = + KeyC( + display = KeyDisplay.TextDisplay("E"), + action = KeyAction.CommitText("E"), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + swipes = + mapOf( + SwipeDirection.TOP_LEFT to + KeyC( + display = KeyDisplay.TextDisplay("D"), + action = KeyAction.CommitText("D"), + ), + SwipeDirection.TOP to + KeyC( + display = KeyDisplay.TextDisplay("&"), + action = KeyAction.CommitText("&"), + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay("°"), + action = KeyAction.CommitText("°"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_RIGHT to + KeyC( + display = KeyDisplay.TextDisplay(">"), + action = KeyAction.CommitText(">"), + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM_LEFT to + KeyC( + display = KeyDisplay.TextDisplay(";"), + action = KeyAction.CommitText(";"), + color = ColorVariant.MUTED, + ), + SwipeDirection.LEFT to + KeyC( + display = KeyDisplay.TextDisplay("#"), + action = KeyAction.CommitText("#"), + color = ColorVariant.MUTED, + ), + ), + ), + ), + listOf( + EMOJI_KEY_ITEM, + BACKSPACE_KEY_ITEM, + SPACEBAR_DOUBLE_KEY_ITEM, + NUMERIC_KEY_ITEM, + RETURN_KEY_ITEM, + ), + ), + ) + +val KB_EN_DOUBLE_SYMBOLS: KeyboardDefinition = + KeyboardDefinition( + title = "english double symbols", + modes = + KeyboardDefinitionModes( + main = KB_EN_DOUBLE_SYMBOLS_MAIN, + shifted = KB_EN_DOUBLE_SYMBOLS_SHIFTED, + numeric = DOUBLE_NUMERIC_KEYBOARD, + ), + settings = + KeyboardDefinitionSettings( + autoCapitalizers = arrayOf(::autoCapitalizeI, ::autoCapitalizeIApostrophe), + ), + ) diff --git a/app/src/main/java/com/dessalines/thumbkey/utils/KeyboardLayout.kt b/app/src/main/java/com/dessalines/thumbkey/utils/KeyboardLayout.kt index 2dc1b8eb1..5979fd701 100644 --- a/app/src/main/java/com/dessalines/thumbkey/utils/KeyboardLayout.kt +++ b/app/src/main/java/com/dessalines/thumbkey/utils/KeyboardLayout.kt @@ -12,6 +12,7 @@ import com.dessalines.thumbkey.keyboards.KB_DE_THUMBKEY_MULTILINGUAL import com.dessalines.thumbkey.keyboards.KB_DE_TYPESPLIT import com.dessalines.thumbkey.keyboards.KB_ENEO_MESSAGEEASE_SYMBOLS import com.dessalines.thumbkey.keyboards.KB_EN_CZ_THUMBKEY +import com.dessalines.thumbkey.keyboards.KB_EN_DOUBLE_SYMBOLS import com.dessalines.thumbkey.keyboards.KB_EN_EE_THUMBKEY import com.dessalines.thumbkey.keyboards.KB_EN_IT_THUMBKEY import com.dessalines.thumbkey.keyboards.KB_EN_MESSAGEEASE @@ -178,4 +179,5 @@ enum class KeyboardLayout(val index: Int, val keyboardDefinition: KeyboardDefini ENMIThumbKeySymbols(84, KB_EN_MI_THUMBKEY_SYMBOLS), ESCAMessageEase(85, KB_ES_CA_MESSAGEEASE), SVMessageEase(86, KB_SV_MESSAGEEASE), + ENDoubleSymbols(87, KB_EN_DOUBLE_SYMBOLS), } From 6e6bb8b2d71af746dcbfd6cc918edef887ecf24a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alen=20=C5=A0iljak?= Date: Sat, 6 Jan 2024 22:07:43 +0100 Subject: [PATCH 2/2] fitting the numeric layout --- .../thumbkey/keyboards/DoubleNumeric.kt | 44 ++++++------------- .../thumbkey/keyboards/ENDoubleSymbols.kt | 2 +- 2 files changed, 14 insertions(+), 32 deletions(-) diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/DoubleNumeric.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/DoubleNumeric.kt index 4479eb788..4c790c903 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/DoubleNumeric.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/DoubleNumeric.kt @@ -111,7 +111,6 @@ val DOUBLE_NUMERIC_KEYBOARD = ), ), ), - EMOJI_KEY_ITEM, KeyItemC( center = KeyC( @@ -293,16 +292,6 @@ val DOUBLE_NUMERIC_KEYBOARD = ), ), ), - KeyItemC( - center = - KeyC( - display = KeyDisplay.IconDisplay(Icons.Outlined.Abc), - action = KeyAction.ToggleNumericMode(false), - size = FontSizeVariant.LARGE, - color = ColorVariant.PRIMARY, - ), - backgroundColor = ColorVariant.SURFACE_VARIANT, - ), KeyItemC( center = KeyC( @@ -494,7 +483,6 @@ val DOUBLE_NUMERIC_KEYBOARD = ), ), ), - BACKSPACE_KEY_ITEM, KeyItemC( center = KeyC( @@ -603,6 +591,16 @@ val DOUBLE_NUMERIC_KEYBOARD = ), ), listOf( + KeyItemC( + center = + KeyC( + display = KeyDisplay.IconDisplay(Icons.Outlined.Abc), + action = KeyAction.ToggleNumericMode(false), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + backgroundColor = ColorVariant.SURFACE_VARIANT, + ), KeyItemC( center = KeyC( @@ -611,8 +609,9 @@ val DOUBLE_NUMERIC_KEYBOARD = size = FontSizeVariant.LARGE, color = ColorVariant.PRIMARY, ), - widthMultiplier = 2, ), + // EMOJI_KEY_ITEM, + BACKSPACE_KEY_ITEM, KeyItemC( center = KeyC( @@ -629,7 +628,6 @@ val DOUBLE_NUMERIC_KEYBOARD = ), backgroundColor = ColorVariant.SURFACE_VARIANT, ), - RETURN_KEY_ITEM, KeyItemC( center = KeyC( @@ -638,24 +636,8 @@ val DOUBLE_NUMERIC_KEYBOARD = size = FontSizeVariant.LARGE, color = ColorVariant.PRIMARY, ), - widthMultiplier = 2, - ), - KeyItemC( - center = - KeyC( - display = KeyDisplay.TextDisplay(" "), - action = KeyAction.CommitText(" "), - ), - nextTapActions = - listOf( - KeyAction.ReplaceLastText(". ", trimCount = 1), - KeyAction.ReplaceLastText(", "), - KeyAction.ReplaceLastText("? "), - KeyAction.ReplaceLastText("! "), - KeyAction.ReplaceLastText(": "), - ), - backgroundColor = ColorVariant.SURFACE_VARIANT, ), + RETURN_KEY_ITEM, ), ), ) diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ENDoubleSymbols.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ENDoubleSymbols.kt index a262c5b20..8d1ba1bf0 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ENDoubleSymbols.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ENDoubleSymbols.kt @@ -853,7 +853,7 @@ val KB_EN_DOUBLE_SYMBOLS_MAIN = listOf( EMOJI_KEY_ITEM, BACKSPACE_KEY_ITEM, - SPACEBAR_KEY_ITEM, + SPACEBAR_DOUBLE_KEY_ITEM, NUMERIC_KEY_ITEM, RETURN_KEY_ITEM, ),