Skip to content

Commit

Permalink
Adding Arabic levant thumbkey keyboard. (#1224)
Browse files Browse the repository at this point in the history
- Fixes #1222
  • Loading branch information
dessalines authored Jan 7, 2025
1 parent 58bae97 commit 37419f0
Show file tree
Hide file tree
Showing 3 changed files with 203 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
@file:Suppress("ktlint:standard:no-wildcard-imports")

package com.dessalines.thumbkey.keyboards

import com.dessalines.thumbkey.utils.*
import com.dessalines.thumbkey.utils.ColorVariant.*
import com.dessalines.thumbkey.utils.FontSizeVariant.*

val KB_AR_THUMBKEY_LEVANT_MAIN =
KeyboardC(
listOf(
listOf(
KeyItemC(
center = KeyC("ب", size = LARGE),
bottomRight = KeyC("ش"),
),
KeyItemC(
center = KeyC("ر", size = LARGE),
bottomRight = KeyC("ز"),
bottom = KeyC("ق"),
),
KeyItemC(
center = KeyC("و", size = LARGE),
top = KeyC("ؤ"),
bottomLeft = KeyC("س"),
),
EMOJI_KEY_ITEM,
),
listOf(
KeyItemC(
center = KeyC("ن", size = LARGE),
right = KeyC("ف"),
bottomRight = KeyC("ذ"),
left = KeyC(")", color = MUTED),
),
KeyItemC(
center = KeyC("ت", size = LARGE),
topLeft = KeyC("ض"),
top = KeyC("ث"),
topRight = KeyC("خ"),
right = KeyC("ح"),
bottomRight = KeyC("ج"),
bottom = KeyC("ة"),
bottomLeft = KeyC("ص"),
left = KeyC("ط"),
),
KeyItemC(
center = KeyC("ي", size = LARGE),
top = KeyC("ئ"),
right = KeyC("(", color = MUTED),
bottom = KeyC("ى"),
bottomLeft = KeyC("غ"),
left = KeyC("ك"),
),
NUMERIC_KEY_ITEM,
),
listOf(
KeyItemC(
center = KeyC("ل", size = LARGE),
topRight = KeyC("د"),
bottomRight = KeyC(":", color = MUTED),
bottomLeft = KeyC("!", color = MUTED),
),
KeyItemC(
center = KeyC("م", size = LARGE),
top = KeyC("ه"),
topRight = KeyC("ظ"),
bottomRight = KeyC("،", color = MUTED),
bottom = KeyC(".", color = MUTED),
bottomLeft = KeyC("؟", color = MUTED),
),
KeyItemC(
center = KeyC("ا", size = LARGE),
topLeft = KeyC("ع"),
top = KeyC("أ"),
topRight = KeyC("آ"),
bottom = KeyC("إ"),
left = KeyC("ء"),
),
BACKSPACE_KEY_ITEM,
),
listOf(
SPACEBAR_KEY_ITEM,
RETURN_KEY_ITEM,
),
),
)

val KB_AR_THUMBKEY_LEVANT: KeyboardDefinition =
KeyboardDefinition(
title = "عربية شامية thumb-key",
modes =
KeyboardDefinitionModes(
main = KB_AR_THUMBKEY_LEVANT_MAIN,
shifted = KB_AR_THUMBKEY_LEVANT_MAIN,
numeric = ARABIC_NUMERIC_KEYBOARD,
),
)
103 changes: 103 additions & 0 deletions app/src/main/java/com/dessalines/thumbkey/keyboards/NumericArabic.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
@file:Suppress("ktlint:standard:no-wildcard-imports")

package com.dessalines.thumbkey.keyboards

import com.dessalines.thumbkey.utils.*
import com.dessalines.thumbkey.utils.FontSizeVariant.*

val ARABIC_NUMERIC_KEYBOARD =
KeyboardC(
listOf(
listOf(
KeyItemC(
center = KeyC("1", size = LARGE),
bottomLeft = KeyC("$"),
),
KeyItemC(
center = KeyC("2", size = LARGE),
topLeft = KeyC("`"),
top = KeyC("^"),
topRight = KeyC("´"),
right = KeyC("!"),
bottomRight = KeyC("\\"),
bottomLeft = KeyC("/"),
left = KeyC("+"),
),
KeyItemC(
center = KeyC("3", size = LARGE),
bottomRight = KeyC(""),
bottomLeft = KeyC("£"),
bottom = KeyC("="),
),
EMOJI_KEY_ITEM,
),
listOf(
KeyItemC(
center = KeyC("4", size = LARGE),
topLeft = KeyC("{"),
topRight = KeyC("%"),
bottomRight = KeyC("_"),
bottomLeft = KeyC("["),
left = KeyC("("),
),
KeyItemC(
center = KeyC("5", size = LARGE),
topLeft = KeyC("ً"),
top = KeyC("ّ"),
topRight = KeyC("َ"),
right = KeyC("ُ"),
bottomRight = KeyC("ِ"),
bottom = KeyC("ْ"),
bottomLeft = KeyC("ٍ"),
left = KeyC("ٌ"),
),
KeyItemC(
center = KeyC("6", size = LARGE),
topLeft = KeyC("|"),
topRight = KeyC("}"),
right = KeyC(")"),
bottomRight = KeyC("]"),
bottomLeft = KeyC("@"),
),
ABC_KEY_ITEM,
),
listOf(
KeyItemC(
center = KeyC("7", size = LARGE),
topLeft = KeyC("~"),
topRight = KeyC("-"),
bottomRight = KeyC(":"),
bottomLeft = KeyC("!"),
left = KeyC("<"),
),
KeyItemC(
center = KeyC("8", size = LARGE),
topLeft = KeyC("\""),
top = KeyC("*"),
topRight = KeyC("'"),
right = KeyC("؛"),
bottomRight = KeyC("،"),
bottom = KeyC("."),
bottomLeft = KeyC("؟"),
left = KeyC(","),
),
KeyItemC(
center = KeyC("9", size = LARGE),
top = KeyC("&"),
topRight = KeyC("°"),
right = KeyC(">"),
bottomLeft = KeyC(";"),
left = KeyC("#"),
),
BACKSPACE_KEY_ITEM,
),
listOf(
KeyItemC(
center = KeyC("0", size = LARGE),
widthMultiplier = 2,
),
SPACEBAR_SKINNY_KEY_ITEM,
RETURN_KEY_ITEM,
),
),
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.dessalines.thumbkey.utils

import com.dessalines.thumbkey.keyboards.KB_AR_THUMBKEY_LEVANT
import com.dessalines.thumbkey.keyboards.KB_BG_MESSAGEASE_PHONETIC_SYMBOLS
import com.dessalines.thumbkey.keyboards.KB_BG_THUMBKEY_SYMBOLS
import com.dessalines.thumbkey.keyboards.KB_BR_FR_THUMBKEY
Expand Down Expand Up @@ -332,4 +333,5 @@ enum class KeyboardLayout(
ENDvorakWide(KB_EN_DVORAK_WIDE),
ENDvorakWideCompose(KB_EN_DVORAK_WIDE_COMPOSE),
ENMessagEaseSymbolsModifiers(KB_EN_MESSAGEASE_SYMBOLS_MODIFIERS),
ARThumbKeyLevant(KB_AR_THUMBKEY_LEVANT),
}

0 comments on commit 37419f0

Please sign in to comment.