Skip to content

Commit

Permalink
Add compose keys (caron, breve), quote sign toggle (#1086)
Browse files Browse the repository at this point in the history
* Enable quote toggle

Allow switching between single and double quotes using the compose keys.

* Add compose keys (caron, breve)

* Cosmetic fix: compose keys muted, real keys normal

* Add adjacent swipe (unused) to F to reduce typos.

Narrow "f" swipe would result in mistyping it as "i" sometimes.

* fix indent
  • Loading branch information
mpice-mn authored Sep 24, 2024
1 parent e6e6bf2 commit c78b242
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,15 @@ val KB_EN_THUMBKEY_COMPOSE_MAIN =
),
SwipeDirection.TOP_RIGHT to
KeyC(
display = KeyDisplay.TextDisplay(""),
action = KeyAction.CommitText("m"),
display = KeyDisplay.TextDisplay("ˇ"),
action = KeyAction.ComposeLastKey("ˇ"),
color = ColorVariant.MUTED,
),
SwipeDirection.BOTTOM_RIGHT to
KeyC(
display = KeyDisplay.TextDisplay(""),
action = KeyAction.CommitText("m"),
display = KeyDisplay.TextDisplay("˘"),
action = KeyAction.ComposeLastKey("˘"),
color = ColorVariant.MUTED,
),
SwipeDirection.BOTTOM_LEFT to
KeyC(
Expand Down Expand Up @@ -248,7 +250,7 @@ val KB_EN_THUMBKEY_COMPOSE_MAIN =
),
SwipeDirection.BOTTOM_LEFT to
KeyC(
display = KeyDisplay.TextDisplay("¿¡"),
display = KeyDisplay.TextDisplay("¿¡ßç"),
action = KeyAction.ComposeLastKey("!"),
color = ColorVariant.MUTED,
),
Expand All @@ -275,11 +277,15 @@ val KB_EN_THUMBKEY_COMPOSE_MAIN =
display = KeyDisplay.TextDisplay("f"),
action = KeyAction.CommitText("f"),
),
SwipeDirection.TOP_LEFT to
KeyC(
display = KeyDisplay.TextDisplay(" "),
action = KeyAction.CommitText("f"),
),
SwipeDirection.TOP_RIGHT to
KeyC(
display = KeyDisplay.TextDisplay("'"),
action = KeyAction.CommitText("'"),
color = ColorVariant.MUTED,
),
SwipeDirection.RIGHT to
KeyC(
Expand All @@ -290,19 +296,16 @@ val KB_EN_THUMBKEY_COMPOSE_MAIN =
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,
),
),
),
Expand Down Expand Up @@ -430,13 +433,15 @@ val KB_EN_THUMBKEY_COMPOSE_SHIFTED =
),
SwipeDirection.TOP_RIGHT to
KeyC(
display = KeyDisplay.TextDisplay(""),
action = KeyAction.CommitText("M"),
display = KeyDisplay.TextDisplay("ˇ"),
action = KeyAction.ComposeLastKey("ˇ"),
color = ColorVariant.MUTED,
),
SwipeDirection.BOTTOM_RIGHT to
KeyC(
display = KeyDisplay.TextDisplay(""),
action = KeyAction.CommitText("M"),
display = KeyDisplay.TextDisplay("˘"),
action = KeyAction.ComposeLastKey("˘"),
color = ColorVariant.MUTED,
),
SwipeDirection.TOP_LEFT to
KeyC(
Expand Down Expand Up @@ -564,7 +569,7 @@ val KB_EN_THUMBKEY_COMPOSE_SHIFTED =
),
SwipeDirection.BOTTOM_LEFT to
KeyC(
display = KeyDisplay.TextDisplay("¿¡"),
display = KeyDisplay.TextDisplay("¿¡ßÇ"),
action = KeyAction.ComposeLastKey("!"),
color = ColorVariant.MUTED,
),
Expand All @@ -591,11 +596,15 @@ val KB_EN_THUMBKEY_COMPOSE_SHIFTED =
display = KeyDisplay.TextDisplay("F"),
action = KeyAction.CommitText("F"),
),
SwipeDirection.TOP_LEFT to
KeyC(
display = KeyDisplay.TextDisplay(" "),
action = KeyAction.CommitText("F"),
),
SwipeDirection.TOP_RIGHT to
KeyC(
display = KeyDisplay.TextDisplay("'"),
action = KeyAction.CommitText("'"),
color = ColorVariant.MUTED,
),
SwipeDirection.RIGHT to
KeyC(
Expand All @@ -606,19 +615,16 @@ val KB_EN_THUMBKEY_COMPOSE_SHIFTED =
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,
),
),
),
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/com/dessalines/thumbkey/utils/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ fun performKeyAction(
"y" -> "ÿ"
"Y" -> "Ÿ"
" " -> "\""
"'" -> "\""
else -> textBefore
}

Expand Down Expand Up @@ -472,6 +473,7 @@ fun performKeyAction(
"Z" -> "Ź"
"'" -> ""
" " -> "'"
"\"" -> "'"
else -> textBefore
}

Expand Down

0 comments on commit c78b242

Please sign in to comment.