Skip to content

Commit

Permalink
Update composing and add it to DEMessagEaseSymbols (#844)
Browse files Browse the repository at this point in the history
Also improves composing for ENMessagEaseCompose

Using only DEMessagEaseSymbols or ENMessagEaseCompose one can type
letters for a few more languages (but probably many more):
- Norwegian/Danish, e.g. øæ
- Swedish, e.g. åä
- German, e.g. ßöü
- French, e.g. çéè
- Spanish, e.g. ¿¡ñ
- Esperanto ĉĥŭ
- Polish ążł

The key ¿¡ is used as a joker and moved to a more easily reacheable
position

Co-authored-by: mensogulo <mensogulo@users.noreply.github.com>
  • Loading branch information
mensogulo and mensogulo authored Apr 10, 2024
1 parent f85e7fa commit 1efc552
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ val KB_DE_MESSAGEASE_SYMBOLS_MAIN =
action = KeyAction.CommitText("-"),
color = ColorVariant.MUTED,
),
SwipeDirection.TOP_RIGHT to
KeyC(
display = KeyDisplay.TextDisplay("¿¡"),
action = KeyAction.ComposeLastKey("!"),
color = ColorVariant.MUTED,
),
),
),
KeyItemC(
Expand All @@ -67,13 +73,13 @@ val KB_DE_MESSAGEASE_SYMBOLS_MAIN =
SwipeDirection.TOP to
KeyC(
display = KeyDisplay.TextDisplay("^"),
action = KeyAction.CommitText("^"),
action = KeyAction.ComposeLastKey("^"),
color = ColorVariant.MUTED,
),
SwipeDirection.TOP_LEFT to
KeyC(
display = KeyDisplay.TextDisplay("`"),
action = KeyAction.CommitText("`"),
action = KeyAction.ComposeLastKey("`"),
color = ColorVariant.MUTED,
),
SwipeDirection.LEFT to
Expand Down Expand Up @@ -108,7 +114,7 @@ val KB_DE_MESSAGEASE_SYMBOLS_MAIN =
SwipeDirection.TOP_RIGHT to
KeyC(
display = KeyDisplay.TextDisplay("´"),
action = KeyAction.CommitText("´"),
action = KeyAction.ComposeLastKey("'"),
color = ColorVariant.MUTED,
),
),
Expand All @@ -123,6 +129,12 @@ val KB_DE_MESSAGEASE_SYMBOLS_MAIN =
),
swipes =
mapOf(
SwipeDirection.TOP to
KeyC(
display = KeyDisplay.TextDisplay("˘"),
action = KeyAction.ComposeLastKey("˘"),
color = ColorVariant.MUTED,
),
SwipeDirection.LEFT to
KeyC(
display = KeyDisplay.TextDisplay("?"),
Expand Down Expand Up @@ -329,7 +341,7 @@ val KB_DE_MESSAGEASE_SYMBOLS_MAIN =
SwipeDirection.TOP_LEFT to
KeyC(
display = KeyDisplay.TextDisplay("~"),
action = KeyAction.CommitText("~"),
action = KeyAction.ComposeLastKey("~"),
color = ColorVariant.MUTED,
),
SwipeDirection.LEFT to
Expand Down Expand Up @@ -374,7 +386,7 @@ val KB_DE_MESSAGEASE_SYMBOLS_MAIN =
SwipeDirection.TOP_LEFT to
KeyC(
display = KeyDisplay.TextDisplay("\""),
action = KeyAction.CommitText("\""),
action = KeyAction.ComposeLastKey("\""),
color = ColorVariant.MUTED,
),
SwipeDirection.BOTTOM_LEFT to
Expand Down Expand Up @@ -450,7 +462,7 @@ val KB_DE_MESSAGEASE_SYMBOLS_MAIN =
SwipeDirection.TOP_RIGHT to
KeyC(
display = KeyDisplay.TextDisplay("°"),
action = KeyAction.CommitText("°"),
action = KeyAction.ComposeLastKey("°"),
color = ColorVariant.MUTED,
),
),
Expand Down Expand Up @@ -500,6 +512,12 @@ val KB_DE_MESSAGEASE_SYMBOLS_SHIFTED =
action = KeyAction.CommitText("-"),
color = ColorVariant.MUTED,
),
SwipeDirection.TOP_RIGHT to
KeyC(
display = KeyDisplay.TextDisplay("¿¡"),
action = KeyAction.ComposeLastKey("!"),
color = ColorVariant.MUTED,
),
),
),
KeyItemC(
Expand All @@ -515,13 +533,13 @@ val KB_DE_MESSAGEASE_SYMBOLS_SHIFTED =
SwipeDirection.TOP to
KeyC(
display = KeyDisplay.TextDisplay("^"),
action = KeyAction.CommitText("^"),
action = KeyAction.ComposeLastKey("^"),
color = ColorVariant.MUTED,
),
SwipeDirection.TOP_LEFT to
KeyC(
display = KeyDisplay.TextDisplay("`"),
action = KeyAction.CommitText("`"),
action = KeyAction.ComposeLastKey("`"),
color = ColorVariant.MUTED,
),
SwipeDirection.LEFT to
Expand Down Expand Up @@ -556,7 +574,7 @@ val KB_DE_MESSAGEASE_SYMBOLS_SHIFTED =
SwipeDirection.TOP_RIGHT to
KeyC(
display = KeyDisplay.TextDisplay("´"),
action = KeyAction.CommitText("´"),
action = KeyAction.ComposeLastKey("'"),
color = ColorVariant.MUTED,
),
),
Expand All @@ -571,6 +589,12 @@ val KB_DE_MESSAGEASE_SYMBOLS_SHIFTED =
),
swipes =
mapOf(
SwipeDirection.TOP to
KeyC(
display = KeyDisplay.TextDisplay("˘"),
action = KeyAction.ComposeLastKey("˘"),
color = ColorVariant.MUTED,
),
SwipeDirection.LEFT to
KeyC(
display = KeyDisplay.TextDisplay("?"),
Expand Down Expand Up @@ -784,7 +808,7 @@ val KB_DE_MESSAGEASE_SYMBOLS_SHIFTED =
SwipeDirection.TOP_LEFT to
KeyC(
display = KeyDisplay.TextDisplay("~"),
action = KeyAction.CommitText("~"),
action = KeyAction.ComposeLastKey("~"),
color = ColorVariant.MUTED,
),
SwipeDirection.LEFT to
Expand Down Expand Up @@ -829,7 +853,7 @@ val KB_DE_MESSAGEASE_SYMBOLS_SHIFTED =
SwipeDirection.TOP_LEFT to
KeyC(
display = KeyDisplay.TextDisplay("\""),
action = KeyAction.CommitText("\""),
action = KeyAction.ComposeLastKey("\""),
color = ColorVariant.MUTED,
),
SwipeDirection.BOTTOM_LEFT to
Expand Down Expand Up @@ -905,7 +929,7 @@ val KB_DE_MESSAGEASE_SYMBOLS_SHIFTED =
SwipeDirection.TOP_RIGHT to
KeyC(
display = KeyDisplay.TextDisplay("°"),
action = KeyAction.CommitText("°"),
action = KeyAction.ComposeLastKey("°"),
color = ColorVariant.MUTED,
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ val KB_EN_MESSAGEASE_COMPOSED_MAIN =
),
swipes =
mapOf(
SwipeDirection.TOP_RIGHT to
KeyC(
display = KeyDisplay.TextDisplay("¿¡"),
action = KeyAction.ComposeLastKey("!"),
color = ColorVariant.MUTED,
),
SwipeDirection.BOTTOM_RIGHT to
KeyC(
display = KeyDisplay.TextDisplay("v"),
Expand Down Expand Up @@ -343,12 +349,6 @@ val KB_EN_MESSAGEASE_COMPOSED_MAIN =
action = KeyAction.CommitText("*"),
color = ColorVariant.MUTED,
),
SwipeDirection.BOTTOM_LEFT to
KeyC(
display = KeyDisplay.TextDisplay("¿¡"),
action = KeyAction.ComposeLastKey("!"),
color = ColorVariant.MUTED,
),
SwipeDirection.BOTTOM_RIGHT to
KeyC(
display = KeyDisplay.TextDisplay(""),
Expand Down Expand Up @@ -485,6 +485,12 @@ val KB_EN_MESSAGEASE_COMPOSED_SHIFTED =
),
swipes =
mapOf(
SwipeDirection.TOP_RIGHT to
KeyC(
display = KeyDisplay.TextDisplay("¿¡"),
action = KeyAction.ComposeLastKey("!"),
color = ColorVariant.MUTED,
),
SwipeDirection.BOTTOM_RIGHT to
KeyC(
display = KeyDisplay.TextDisplay("V"),
Expand Down Expand Up @@ -573,6 +579,12 @@ val KB_EN_MESSAGEASE_COMPOSED_SHIFTED =
),
swipes =
mapOf(
SwipeDirection.TOP to
KeyC(
display = KeyDisplay.TextDisplay("˘"),
action = KeyAction.ComposeLastKey("˘"),
color = ColorVariant.MUTED,
),
SwipeDirection.TOP_RIGHT to
KeyC(
display = KeyDisplay.TextDisplay("\$"),
Expand Down Expand Up @@ -802,12 +814,6 @@ val KB_EN_MESSAGEASE_COMPOSED_SHIFTED =
action = KeyAction.CommitText("<"),
color = ColorVariant.MUTED,
),
SwipeDirection.BOTTOM_LEFT to
KeyC(
display = KeyDisplay.TextDisplay("¿¡"),
action = KeyAction.ComposeLastKey("!"),
color = ColorVariant.MUTED,
),
SwipeDirection.BOTTOM_RIGHT to
KeyC(
display = KeyDisplay.TextDisplay(""),
Expand Down
10 changes: 8 additions & 2 deletions app/src/main/java/com/dessalines/thumbkey/utils/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -610,14 +610,20 @@ fun performKeyAction(
when (textBefore) {
"a" -> "æ"
"A" -> "Æ"
"æ" -> "ą"
"Æ" -> "Ą"
"c" -> "ç"
"C" -> "Ç"
"e" -> "æ"
"E" -> "Æ"
"e" -> "ę"
"E" -> "Ę"
"l" -> "ł"
"L" -> "Ł"
"o" -> "œ"
"O" -> "Œ"
"s" -> "ß"
"S" -> ""
"z" -> "ż"
"Z" -> "Ż"
"!" -> "¡"
"?" -> "¿"
"`" -> ""
Expand Down

0 comments on commit 1efc552

Please sign in to comment.