Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added emoji key to Type-Split layout. Fixes #432 #524

Merged
merged 1 commit into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added emoji key to Type-Split layout. Fixes #432
  • Loading branch information
sslater11 committed Oct 21, 2023
commit 2b0b623f8add8393716cb798e741d596208c5dbf
82 changes: 28 additions & 54 deletions app/src/main/java/com/dessalines/thumbkey/keyboards/CommonKeys.kt
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ val RETURN_KEY_ITEM =
backgroundColor = ColorVariant.SURFACE_VARIANT,
)

val SPACEBAR_TYPESPLIT_TOP_KEY_ITEM =
val SPACEBAR_TYPESPLIT_MIDDLE_KEY_ITEM =
KeyItemC(
center = KeyC(
display = KeyDisplay.TextDisplay(" "),
Expand All @@ -302,15 +302,15 @@ val SPACEBAR_TYPESPLIT_TOP_KEY_ITEM =
),
display = null,
),
SwipeDirection.BOTTOM to KeyC(
display = KeyDisplay.TextDisplay("*"),
action = KeyAction.CommitText("*"),
SwipeDirection.TOP to KeyC(
display = KeyDisplay.TextDisplay("'"),
action = KeyAction.CommitText("'"),
color = ColorVariant.MUTED,
),
SwipeDirection.TOP to KeyC(
display = KeyDisplay.IconDisplay(Icons.Outlined.Settings),
action = KeyAction.GotoSettings,
color = ColorVariant.SECONDARY,
SwipeDirection.BOTTOM to KeyC(
display = KeyDisplay.TextDisplay(","),
action = KeyAction.CommitText(","),
color = ColorVariant.MUTED,
),
),
nextTapActions = listOf(
Expand All @@ -323,7 +323,8 @@ val SPACEBAR_TYPESPLIT_TOP_KEY_ITEM =
),
backgroundColor = ColorVariant.SURFACE_VARIANT,
)
val SPACEBAR_TYPESPLIT_MIDDLE_KEY_ITEM = SPACEBAR_TYPESPLIT_TOP_KEY_ITEM.copy(
val SPACEBAR_TYPESPLIT_BOTTOM_KEY_ITEM = SPACEBAR_TYPESPLIT_MIDDLE_KEY_ITEM.copy(
swipeType = SwipeNWay.EIGHT_WAY,
swipes = mapOf(
SwipeDirection.LEFT to KeyC(
action = KeyAction.SendEvent(
Expand All @@ -343,52 +344,25 @@ val SPACEBAR_TYPESPLIT_MIDDLE_KEY_ITEM = SPACEBAR_TYPESPLIT_TOP_KEY_ITEM.copy(
),
display = null,
),
SwipeDirection.BOTTOM to KeyC(
display = KeyDisplay.TextDisplay(","),
action = KeyAction.CommitText(","),
color = ColorVariant.MUTED,
),
SwipeDirection.TOP to KeyC(
display = KeyDisplay.TextDisplay("'"),
action = KeyAction.CommitText("'"),
display = KeyDisplay.TextDisplay("-"),
action = KeyAction.CommitText("-"),
color = ColorVariant.MUTED,
),
),
)
val SPACEBAR_TYPESPLIT_BOTTOM_KEY_ITEM = SPACEBAR_TYPESPLIT_TOP_KEY_ITEM.copy(
swipes = mapOf(
SwipeDirection.LEFT to KeyC(
action = KeyAction.SendEvent(
KeyEvent(
KeyEvent.ACTION_DOWN,
KeyEvent.KEYCODE_DPAD_LEFT,
),
),
display = null,
),
SwipeDirection.RIGHT to KeyC(
action = KeyAction.SendEvent(
KeyEvent(
KeyEvent.ACTION_DOWN,
KeyEvent.KEYCODE_DPAD_RIGHT,
),
),
display = null,
),
SwipeDirection.BOTTOM to KeyC(
display = KeyDisplay.TextDisplay("."),
action = KeyAction.CommitText("."),
color = ColorVariant.MUTED,
),
SwipeDirection.TOP to KeyC(
display = KeyDisplay.TextDisplay("-"),
action = KeyAction.CommitText("-"),
SwipeDirection.BOTTOM_LEFT to KeyC(
display = KeyDisplay.TextDisplay("*"),
action = KeyAction.CommitText("*"),
color = ColorVariant.MUTED,
),
),
)

val SPACEBAR_ALL_SYMBOLS = SPACEBAR_TYPESPLIT_TOP_KEY_ITEM.copy(
val SPACEBAR_ALL_SYMBOLS = SPACEBAR_TYPESPLIT_MIDDLE_KEY_ITEM.copy(
swipes = mapOf(
SwipeDirection.LEFT to KeyC(
display = KeyDisplay.TextDisplay(","),
Expand All @@ -400,19 +374,19 @@ val SPACEBAR_ALL_SYMBOLS = SPACEBAR_TYPESPLIT_TOP_KEY_ITEM.copy(
action = KeyAction.CommitText("'"),
color = ColorVariant.MUTED,
),
SwipeDirection.BOTTOM 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.BOTTOM to KeyC(
display = KeyDisplay.TextDisplay("."),
action = KeyAction.CommitText("."),
color = ColorVariant.MUTED,
),
),
)
val SPACEBAR_ALL_DIRECTIONS = SPACEBAR_TYPESPLIT_TOP_KEY_ITEM.copy(
val SPACEBAR_ALL_DIRECTIONS = SPACEBAR_TYPESPLIT_MIDDLE_KEY_ITEM.copy(
swipes = mapOf(
SwipeDirection.LEFT to KeyC(
display = KeyDisplay.TextDisplay("←"),
Expand All @@ -434,22 +408,22 @@ val SPACEBAR_ALL_DIRECTIONS = SPACEBAR_TYPESPLIT_TOP_KEY_ITEM.copy(
),
color = ColorVariant.MUTED,
),
SwipeDirection.BOTTOM to KeyC(
display = KeyDisplay.TextDisplay(""),
SwipeDirection.TOP to KeyC(
display = KeyDisplay.TextDisplay(""),
action = KeyAction.SendEvent(
KeyEvent(
KeyEvent.ACTION_DOWN,
KeyEvent.KEYCODE_DPAD_DOWN,
KeyEvent.KEYCODE_DPAD_UP,
),
),
color = ColorVariant.MUTED,
),
SwipeDirection.TOP to KeyC(
display = KeyDisplay.TextDisplay(""),
SwipeDirection.BOTTOM to KeyC(
display = KeyDisplay.TextDisplay(""),
action = KeyAction.SendEvent(
KeyEvent(
KeyEvent.ACTION_DOWN,
KeyEvent.KEYCODE_DPAD_UP,
KeyEvent.KEYCODE_DPAD_DOWN,
),
),
color = ColorVariant.MUTED,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ val KB_DE_TYPESPLIT_MAIN = KeyboardC(
color = ColorVariant.PRIMARY,
),
),
SPACEBAR_TYPESPLIT_TOP_KEY_ITEM,
EMOJI_KEY_ITEM,
KeyItemC(
center = KeyC(
display = KeyDisplay.TextDisplay("t"),
Expand Down Expand Up @@ -319,7 +319,7 @@ val KB_DE_TYPESPLIT_SHIFTED = KeyboardC(
color = ColorVariant.PRIMARY,
),
),
SPACEBAR_TYPESPLIT_TOP_KEY_ITEM,
EMOJI_KEY_ITEM,
KeyItemC(
center = KeyC(
display = KeyDisplay.TextDisplay("T"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ val KB_EN_NO_TYPESPLIT_MAIN = KeyboardC(
),
),
),
SPACEBAR_TYPESPLIT_TOP_KEY_ITEM,
EMOJI_KEY_ITEM,
KeyItemC(
center = KeyC(
display = KeyDisplay.TextDisplay("i"),
Expand Down Expand Up @@ -309,7 +309,7 @@ val KB_EN_NO_TYPESPLIT_SHIFTED = KeyboardC(
),
),
),
SPACEBAR_TYPESPLIT_TOP_KEY_ITEM,
EMOJI_KEY_ITEM,
KeyItemC(
center = KeyC(
display = KeyDisplay.TextDisplay("I"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ val KB_EN_TYPESPLIT_MAIN = KeyboardC(
),
),
),
SPACEBAR_TYPESPLIT_TOP_KEY_ITEM,
EMOJI_KEY_ITEM,
KeyItemC(
center = KeyC(
display = KeyDisplay.TextDisplay("i"),
Expand Down Expand Up @@ -294,7 +294,7 @@ val KB_EN_TYPESPLIT_SHIFTED = KeyboardC(
),
),
),
SPACEBAR_TYPESPLIT_TOP_KEY_ITEM,
EMOJI_KEY_ITEM,
KeyItemC(
center = KeyC(
display = KeyDisplay.TextDisplay("I"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ val KB_ES_TYPESPLIT_MAIN = KeyboardC(
),
),
),
SPACEBAR_TYPESPLIT_TOP_KEY_ITEM,
EMOJI_KEY_ITEM,
KeyItemC(
center = KeyC(
display = KeyDisplay.TextDisplay("i"),
Expand Down Expand Up @@ -381,7 +381,7 @@ val KB_ES_TYPESPLIT_SHIFTED = KeyboardC(
),
),
),
SPACEBAR_TYPESPLIT_TOP_KEY_ITEM,
EMOJI_KEY_ITEM,
KeyItemC(
center = KeyC(
display = KeyDisplay.TextDisplay("I"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ val KB_FI_TYPESPLIT_MAIN = KeyboardC(
),
),
),
SPACEBAR_TYPESPLIT_TOP_KEY_ITEM,
EMOJI_KEY_ITEM,
KeyItemC(
center = KeyC(
display = KeyDisplay.TextDisplay("y"),
Expand Down Expand Up @@ -321,7 +321,7 @@ val KB_FI_TYPESPLIT_SHIFTED = KeyboardC(
),
),
),
SPACEBAR_TYPESPLIT_TOP_KEY_ITEM,
EMOJI_KEY_ITEM,
KeyItemC(
center = KeyC(
display = KeyDisplay.TextDisplay("Y"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ val KB_FR_TYPESPLIT_MAIN = KeyboardC(
),
),
),
SPACEBAR_TYPESPLIT_TOP_KEY_ITEM,
EMOJI_KEY_ITEM,
KeyItemC(
center = KeyC(
display = KeyDisplay.TextDisplay("t"),
Expand Down Expand Up @@ -377,7 +377,7 @@ val KB_FR_TYPESPLIT_SHIFTED = KeyboardC(
),
),
),
SPACEBAR_TYPESPLIT_TOP_KEY_ITEM,
EMOJI_KEY_ITEM,
KeyItemC(
center = KeyC(
display = KeyDisplay.TextDisplay("T"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ val KB_IT_TYPESPLIT_MAIN = KeyboardC(
),
),
),
SPACEBAR_TYPESPLIT_TOP_KEY_ITEM,
EMOJI_KEY_ITEM,
KeyItemC(
center = KeyC(
display = KeyDisplay.TextDisplay("i"),
Expand Down Expand Up @@ -334,7 +334,7 @@ val KB_IT_TYPESPLIT_SHIFTED = KeyboardC(
),
),
),
SPACEBAR_TYPESPLIT_TOP_KEY_ITEM,
EMOJI_KEY_ITEM,
KeyItemC(
center = KeyC(
display = KeyDisplay.TextDisplay("I"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ val KB_PL_TYPESPLIT_MAIN = KeyboardC(
),
),
),
SPACEBAR_TYPESPLIT_TOP_KEY_ITEM,
EMOJI_KEY_ITEM,
KeyItemC(
center = KeyC(
display = KeyDisplay.TextDisplay("i"),
Expand Down Expand Up @@ -369,7 +369,7 @@ val KB_PL_TYPESPLIT_SHIFTED = KeyboardC(
),
),
),
SPACEBAR_TYPESPLIT_TOP_KEY_ITEM,
EMOJI_KEY_ITEM,
KeyItemC(
center = KeyC(
display = KeyDisplay.TextDisplay("I"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ val KB_PT_TYPESPLIT_MAIN = KeyboardC(
),
),
),
SPACEBAR_TYPESPLIT_TOP_KEY_ITEM,
EMOJI_KEY_ITEM,
KeyItemC(
center = KeyC(
display = KeyDisplay.TextDisplay("i"),
Expand Down Expand Up @@ -364,7 +364,7 @@ val KB_PT_TYPESPLIT_SHIFTED = KeyboardC(
),
),
),
SPACEBAR_TYPESPLIT_TOP_KEY_ITEM,
EMOJI_KEY_ITEM,
KeyItemC(
center = KeyC(
display = KeyDisplay.TextDisplay("I"),
Expand Down