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

Automatically calculate swipe zones #1116

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import com.dessalines.thumbkey.utils.*
import com.dessalines.thumbkey.utils.ColorVariant.*
import com.dessalines.thumbkey.utils.FontSizeVariant.*
import com.dessalines.thumbkey.utils.KeyAction.*
import com.dessalines.thumbkey.utils.SwipeNWay.*

val KB_BG_MESSAGEASE_PHONETIC_SYMBOLS_MAIN =
KeyboardC(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import com.dessalines.thumbkey.utils.*
import com.dessalines.thumbkey.utils.ColorVariant.*
import com.dessalines.thumbkey.utils.FontSizeVariant.*
import com.dessalines.thumbkey.utils.KeyAction.*
import com.dessalines.thumbkey.utils.SwipeNWay.*

// Adds more punctuation options to the main screen to reduce switches to the numeric keyboard
val KB_BG_THUMBKEY_SYMBOLS_MAIN =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import com.dessalines.thumbkey.utils.*
import com.dessalines.thumbkey.utils.ColorVariant.*
import com.dessalines.thumbkey.utils.FontSizeVariant.*
import com.dessalines.thumbkey.utils.KeyAction.*
import com.dessalines.thumbkey.utils.SwipeNWay.*

val KB_BR_FR_THUMBKEY_MAIN =
KeyboardC(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import com.dessalines.thumbkey.utils.*
import com.dessalines.thumbkey.utils.ColorVariant.*
import com.dessalines.thumbkey.utils.FontSizeVariant.*
import com.dessalines.thumbkey.utils.KeyAction.*
import com.dessalines.thumbkey.utils.SwipeNWay.*

val KB_BY_THUMBKEY_MAIN =
KeyboardC(
Expand All @@ -22,20 +21,17 @@ val KB_BY_THUMBKEY_MAIN =
),
KeyItemC(
center = KeyC("р", size = LARGE),
swipeType = TWO_WAY_VERTICAL,
bottom = KeyC("х"),
),
KeyItemC(
center = KeyC("а", size = LARGE),
swipeType = FOUR_WAY_DIAGONAL,
bottomLeft = KeyC("ж"),
),
EMOJI_KEY_ITEM,
),
listOf(
KeyItemC(
center = KeyC("н", size = LARGE),
swipeType = FOUR_WAY_CROSS,
right = KeyC("м"),
bottom = KeyC("л"),
),
Expand All @@ -52,7 +48,6 @@ val KB_BY_THUMBKEY_MAIN =
),
KeyItemC(
center = KeyC("е", size = LARGE),
swipeType = FOUR_WAY_CROSS,
left = KeyC("ф"),
top =
KeyC(
Expand Down Expand Up @@ -115,20 +110,17 @@ val KB_BY_THUMBKEY_SHIFTED =
),
KeyItemC(
center = KeyC("Р", size = LARGE),
swipeType = TWO_WAY_VERTICAL,
bottom = KeyC("Х"),
),
KeyItemC(
center = KeyC("А", size = LARGE),
swipeType = FOUR_WAY_DIAGONAL,
bottomLeft = KeyC("Ж"),
),
EMOJI_KEY_ITEM,
),
listOf(
KeyItemC(
center = KeyC("Н", size = LARGE),
swipeType = FOUR_WAY_CROSS,
right = KeyC("М"),
bottom = KeyC("Л"),
),
Expand All @@ -145,7 +137,6 @@ val KB_BY_THUMBKEY_SHIFTED =
),
KeyItemC(
center = KeyC("Е", size = LARGE),
swipeType = FOUR_WAY_CROSS,
left = KeyC("Ф"),
top =
KeyC(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import com.dessalines.thumbkey.utils.*
import com.dessalines.thumbkey.utils.ColorVariant.*
import com.dessalines.thumbkey.utils.FontSizeVariant.*
import com.dessalines.thumbkey.utils.KeyAction.*
import com.dessalines.thumbkey.utils.SwipeNWay.*

val KB_BY_THUMBKEY_SYMBOLS_MAIN =
KeyboardC(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import com.dessalines.thumbkey.utils.*
import com.dessalines.thumbkey.utils.ColorVariant.*
import com.dessalines.thumbkey.utils.FontSizeVariant.*
import com.dessalines.thumbkey.utils.KeyAction.*
import com.dessalines.thumbkey.utils.SwipeNWay.*

val KB_CA_THUMBKEY_MAIN =
KeyboardC(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import com.dessalines.thumbkey.utils.*
import com.dessalines.thumbkey.utils.ColorVariant.*
import com.dessalines.thumbkey.utils.FontSizeVariant.*
import com.dessalines.thumbkey.utils.KeyAction.*
import com.dessalines.thumbkey.utils.SwipeNWay.*

val KB_CZ_MESSAGEASE_PROGRAMMING_MAIN =
KeyboardC(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ import com.dessalines.thumbkey.utils.*
import com.dessalines.thumbkey.utils.ColorVariant.*
import com.dessalines.thumbkey.utils.FontSizeVariant.*
import com.dessalines.thumbkey.utils.KeyAction.*
import com.dessalines.thumbkey.utils.SwipeNWay.*

fun textEditKeyItem(center: KeyC) =
KeyItemC(
backgroundColor = SURFACE_VARIANT,
swipeType = EIGHT_WAY,
center = center,
top =
KeyC(
Expand Down Expand Up @@ -58,7 +56,6 @@ fun textEditKeyItem(center: KeyC) =
fun specialActionKeyItem(center: KeyC) =
KeyItemC(
backgroundColor = SURFACE_VARIANT,
swipeType = EIGHT_WAY,
center = center,
top =
KeyC(
Expand Down Expand Up @@ -155,7 +152,6 @@ val BACKSPACE_KEY_ITEM =
size = LARGE,
color = SECONDARY,
),
swipeType = TWO_WAY_HORIZONTAL,
slideType = SlideType.DELETE,
left =
KeyC(
Expand All @@ -176,7 +172,6 @@ val BACKSPACE_WIDE_KEY_ITEM = BACKSPACE_KEY_ITEM.copy(widthMultiplier = 3)
val SPACEBAR_KEY_ITEM =
KeyItemC(
center = KeyC(" "),
swipeType = FOUR_WAY_CROSS,
slideType = SlideType.MOVE_CURSOR,
left =
KeyC(
Expand Down Expand Up @@ -218,7 +213,6 @@ val SPACEBAR_DOUBLE_KEY_ITEM = SPACEBAR_KEY_ITEM.copy(widthMultiplier = 2)
val SPACEBAR_PROGRAMMING_KEY_ITEM =
KeyItemC(
center = KeyC(" "),
swipeType = FOUR_WAY_CROSS,
slideType = SlideType.MOVE_CURSOR,
left =
KeyC(
Expand Down Expand Up @@ -284,7 +278,6 @@ val RETURN_KEY_ITEM =
val SPACEBAR_TYPESPLIT_MIDDLE_KEY_ITEM =
KeyItemC(
center = KeyC(" "),
swipeType = FOUR_WAY_CROSS,
slideType = SlideType.MOVE_CURSOR,
left =
KeyC(
Expand Down Expand Up @@ -323,7 +316,6 @@ val SPACEBAR_TYPESPLIT_MIDDLE_KEY_ITEM =
)
val SPACEBAR_TYPESPLIT_BOTTOM_KEY_ITEM =
SPACEBAR_TYPESPLIT_MIDDLE_KEY_ITEM.copy(
swipeType = EIGHT_WAY,
left =
KeyC(
action =
Expand Down Expand Up @@ -426,7 +418,6 @@ val BACKSPACE_TYPESPLIT_KEY_ITEM =
size = LARGE,
color = SECONDARY,
),
swipeType = FOUR_WAY_CROSS,
slideType = SlideType.DELETE,
left =
KeyC(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,22 @@ import com.dessalines.thumbkey.utils.*
import com.dessalines.thumbkey.utils.ColorVariant.*
import com.dessalines.thumbkey.utils.FontSizeVariant.*
import com.dessalines.thumbkey.utils.KeyAction.*
import com.dessalines.thumbkey.utils.SwipeNWay.*

val KB_DA_THUMBKEY_MAIN =
KeyboardC(
listOf(
listOf(
KeyItemC(
center = KeyC("s", size = LARGE),
swipeType = FOUR_WAY_DIAGONAL,
bottomRight = KeyC("v"),
topLeft = KeyC("w"),
),
KeyItemC(
center = KeyC("r", size = LARGE),
swipeType = TWO_WAY_VERTICAL,
bottom = KeyC("f"),
),
KeyItemC(
center = KeyC("i", size = LARGE),
swipeType = FOUR_WAY_DIAGONAL,
bottomLeft = KeyC("h"),
topRight = KeyC("y"),
),
Expand All @@ -36,7 +32,6 @@ val KB_DA_THUMBKEY_MAIN =
listOf(
KeyItemC(
center = KeyC("n", size = LARGE),
swipeType = TWO_WAY_HORIZONTAL,
right = KeyC("m"),
),
KeyItemC(
Expand All @@ -52,7 +47,6 @@ val KB_DA_THUMBKEY_MAIN =
),
KeyItemC(
center = KeyC("a", size = LARGE),
swipeType = FOUR_WAY_CROSS,
left = KeyC("u"),
top =
KeyC(
Expand All @@ -72,7 +66,6 @@ val KB_DA_THUMBKEY_MAIN =
listOf(
KeyItemC(
center = KeyC("t", size = LARGE),
swipeType = FOUR_WAY_DIAGONAL,
topRight = KeyC("g"),
bottomLeft = KeyC("z"),
),
Expand All @@ -87,7 +80,6 @@ val KB_DA_THUMBKEY_MAIN =
),
KeyItemC(
center = KeyC("e", size = LARGE),
swipeType = FOUR_WAY_DIAGONAL,
topLeft = KeyC("o"),
),
BACKSPACE_KEY_ITEM,
Expand All @@ -105,18 +97,15 @@ val KB_DA_THUMBKEY_SHIFTED =
listOf(
KeyItemC(
center = KeyC("S", size = LARGE),
swipeType = FOUR_WAY_DIAGONAL,
bottomRight = KeyC("V"),
topLeft = KeyC("W"),
),
KeyItemC(
center = KeyC("R", size = LARGE),
swipeType = TWO_WAY_VERTICAL,
bottom = KeyC("F"),
),
KeyItemC(
center = KeyC("I", size = LARGE),
swipeType = FOUR_WAY_DIAGONAL,
bottomLeft = KeyC("H"),
topRight = KeyC("Y"),
),
Expand All @@ -125,7 +114,6 @@ val KB_DA_THUMBKEY_SHIFTED =
listOf(
KeyItemC(
center = KeyC("N", size = LARGE),
swipeType = TWO_WAY_HORIZONTAL,
right = KeyC("M"),
),
KeyItemC(
Expand All @@ -141,7 +129,6 @@ val KB_DA_THUMBKEY_SHIFTED =
),
KeyItemC(
center = KeyC("A", size = LARGE),
swipeType = FOUR_WAY_CROSS,
left = KeyC("U"),
bottom =
KeyC(
Expand All @@ -164,7 +151,6 @@ val KB_DA_THUMBKEY_SHIFTED =
listOf(
KeyItemC(
center = KeyC("T", size = LARGE),
swipeType = FOUR_WAY_DIAGONAL,
topRight = KeyC("G"),
bottomLeft = KeyC("Z"),
),
Expand All @@ -179,7 +165,6 @@ val KB_DA_THUMBKEY_SHIFTED =
),
KeyItemC(
center = KeyC("E", size = LARGE),
swipeType = FOUR_WAY_DIAGONAL,
topLeft = KeyC("O"),
),
BACKSPACE_KEY_ITEM,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import com.dessalines.thumbkey.utils.*
import com.dessalines.thumbkey.utils.ColorVariant.*
import com.dessalines.thumbkey.utils.FontSizeVariant.*
import com.dessalines.thumbkey.utils.KeyAction.*
import com.dessalines.thumbkey.utils.SwipeNWay.*

val KB_EN_DE_THUMBKEY_AE_MAIN =
KeyboardC(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import com.dessalines.thumbkey.utils.*
import com.dessalines.thumbkey.utils.ColorVariant.*
import com.dessalines.thumbkey.utils.FontSizeVariant.*
import com.dessalines.thumbkey.utils.KeyAction.*
import com.dessalines.thumbkey.utils.SwipeNWay.*

val KB_DE_MESSAGEASE_MAIN =
KeyboardC(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import com.dessalines.thumbkey.utils.*
import com.dessalines.thumbkey.utils.ColorVariant.*
import com.dessalines.thumbkey.utils.FontSizeVariant.*
import com.dessalines.thumbkey.utils.KeyAction.*
import com.dessalines.thumbkey.utils.SwipeNWay.*

val KB_DE_NORDIC_MESSAGEASE_MAIN =
KeyboardC(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import com.dessalines.thumbkey.utils.*
import com.dessalines.thumbkey.utils.ColorVariant.*
import com.dessalines.thumbkey.utils.FontSizeVariant.*
import com.dessalines.thumbkey.utils.KeyAction.*
import com.dessalines.thumbkey.utils.SwipeNWay.*

val KB_DE_MESSAGEASE_SYMBOLS_MAIN =
KeyboardC(
Expand Down
Loading