-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Numeric layout for type-split. (#337)
* Numeric layout for type-split. A numeric layout better suited for the type-split layouts. * Numeric layout for type-split. A numeric layout better suited for the type-split layouts. * Revert "Numeric layout for type-split." This reverts commit e525ab6. * Type-split: set new numeric mode.
- Loading branch information
1 parent
21a0c5e
commit fd8859b
Showing
8 changed files
with
316 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
309 changes: 309 additions & 0 deletions
309
app/src/main/java/com/dessalines/thumbkey/keyboards/TypeSplitNumeric.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,309 @@ | ||
package com.dessalines.thumbkey.keyboards | ||
|
||
import androidx.compose.material.icons.Icons | ||
import androidx.compose.material.icons.outlined.Abc | ||
import androidx.compose.material.icons.outlined.Settings | ||
import com.dessalines.thumbkey.utils.ColorVariant | ||
import com.dessalines.thumbkey.utils.FontSizeVariant | ||
import com.dessalines.thumbkey.utils.KeyAction | ||
import com.dessalines.thumbkey.utils.KeyC | ||
import com.dessalines.thumbkey.utils.KeyDisplay | ||
import com.dessalines.thumbkey.utils.KeyItemC | ||
import com.dessalines.thumbkey.utils.KeyboardC | ||
import com.dessalines.thumbkey.utils.SwipeDirection | ||
|
||
val TYPESPLIT_NUMERIC_KEYBOARD = KeyboardC( | ||
listOf( | ||
listOf( | ||
KeyItemC( | ||
center = KeyC( | ||
display = KeyDisplay.TextDisplay(" "), | ||
action = KeyAction.CommitText(" "), | ||
), | ||
swipes = mapOf( | ||
SwipeDirection.TOP to KeyC( | ||
display = KeyDisplay.IconDisplay(Icons.Outlined.Settings), | ||
action = KeyAction.GotoSettings, | ||
color = ColorVariant.SECONDARY, | ||
), | ||
), | ||
backgroundColor = ColorVariant.SURFACE_VARIANT, | ||
), | ||
KeyItemC( | ||
center = KeyC( | ||
display = KeyDisplay.TextDisplay("1"), | ||
action = KeyAction.CommitText("1"), | ||
size = FontSizeVariant.LARGE, | ||
color = ColorVariant.PRIMARY, | ||
), | ||
swipes = mapOf( | ||
SwipeDirection.BOTTOM_LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay("$"), | ||
action = KeyAction.CommitText("$"), | ||
), | ||
), | ||
), | ||
KeyItemC( | ||
center = KeyC( | ||
display = KeyDisplay.TextDisplay("2"), | ||
action = KeyAction.CommitText("2"), | ||
size = FontSizeVariant.LARGE, | ||
color = ColorVariant.PRIMARY, | ||
), | ||
swipes = mapOf( | ||
SwipeDirection.TOP_LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay("`"), | ||
action = KeyAction.CommitText("`"), | ||
), | ||
SwipeDirection.TOP to KeyC( | ||
display = KeyDisplay.TextDisplay("^"), | ||
action = KeyAction.CommitText("^"), | ||
), | ||
SwipeDirection.TOP_RIGHT to KeyC( | ||
display = KeyDisplay.TextDisplay("´"), | ||
action = KeyAction.CommitText("´"), | ||
), | ||
SwipeDirection.RIGHT to KeyC( | ||
display = KeyDisplay.TextDisplay("!"), | ||
action = KeyAction.CommitText("!"), | ||
), | ||
SwipeDirection.BOTTOM_RIGHT to KeyC( | ||
display = KeyDisplay.TextDisplay("\\"), | ||
action = KeyAction.CommitText("\\"), | ||
), | ||
SwipeDirection.BOTTOM_LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay("/"), | ||
action = KeyAction.CommitText("/"), | ||
), | ||
SwipeDirection.LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay("+"), | ||
action = KeyAction.CommitText("+"), | ||
), | ||
), | ||
), | ||
KeyItemC( | ||
center = KeyC( | ||
display = KeyDisplay.TextDisplay("3"), | ||
action = KeyAction.CommitText("3"), | ||
size = FontSizeVariant.LARGE, | ||
color = ColorVariant.PRIMARY, | ||
), | ||
swipes = mapOf( | ||
SwipeDirection.LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay("?"), | ||
action = KeyAction.CommitText("?"), | ||
), | ||
SwipeDirection.BOTTOM_RIGHT to KeyC( | ||
display = KeyDisplay.TextDisplay("€"), | ||
action = KeyAction.CommitText("€"), | ||
), | ||
SwipeDirection.BOTTOM_LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay("£"), | ||
action = KeyAction.CommitText("£"), | ||
), | ||
SwipeDirection.BOTTOM to KeyC( | ||
display = KeyDisplay.TextDisplay("="), | ||
action = KeyAction.CommitText("="), | ||
), | ||
), | ||
), | ||
KeyItemC( | ||
center = KeyC( | ||
display = KeyDisplay.TextDisplay("."), | ||
action = KeyAction.CommitText("."), | ||
size = FontSizeVariant.LARGE, | ||
color = ColorVariant.PRIMARY, | ||
), | ||
), | ||
), | ||
listOf( | ||
SPACEBAR_SKINNY_KEY_ITEM, | ||
KeyItemC( | ||
center = KeyC( | ||
display = KeyDisplay.TextDisplay("4"), | ||
action = KeyAction.CommitText("4"), | ||
size = FontSizeVariant.LARGE, | ||
color = ColorVariant.PRIMARY, | ||
), | ||
swipes = mapOf( | ||
SwipeDirection.TOP_LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay("{"), | ||
action = KeyAction.CommitText("{"), | ||
), | ||
SwipeDirection.TOP_RIGHT to KeyC( | ||
display = KeyDisplay.TextDisplay("%"), | ||
action = KeyAction.CommitText("%"), | ||
), | ||
SwipeDirection.BOTTOM_RIGHT to KeyC( | ||
display = KeyDisplay.TextDisplay("_"), | ||
action = KeyAction.CommitText("_"), | ||
), | ||
SwipeDirection.BOTTOM_LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay("["), | ||
action = KeyAction.CommitText("["), | ||
), | ||
SwipeDirection.LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay("("), | ||
action = KeyAction.CommitText("("), | ||
), | ||
), | ||
), | ||
KeyItemC( | ||
center = KeyC( | ||
display = KeyDisplay.TextDisplay("5"), | ||
action = KeyAction.CommitText("5"), | ||
size = FontSizeVariant.LARGE, | ||
color = ColorVariant.PRIMARY, | ||
), | ||
), | ||
KeyItemC( | ||
center = KeyC( | ||
display = KeyDisplay.TextDisplay("6"), | ||
action = KeyAction.CommitText("6"), | ||
size = FontSizeVariant.LARGE, | ||
color = ColorVariant.PRIMARY, | ||
), | ||
swipes = mapOf( | ||
SwipeDirection.TOP_LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay("|"), | ||
action = KeyAction.CommitText("|"), | ||
), | ||
SwipeDirection.TOP_RIGHT to KeyC( | ||
display = KeyDisplay.TextDisplay("}"), | ||
action = KeyAction.CommitText("}"), | ||
), | ||
SwipeDirection.RIGHT to KeyC( | ||
display = KeyDisplay.TextDisplay(")"), | ||
action = KeyAction.CommitText(")"), | ||
), | ||
SwipeDirection.BOTTOM_RIGHT to KeyC( | ||
display = KeyDisplay.TextDisplay("]"), | ||
action = KeyAction.CommitText("]"), | ||
), | ||
SwipeDirection.BOTTOM_LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay("@"), | ||
action = KeyAction.CommitText("@"), | ||
), | ||
), | ||
), | ||
KeyItemC( | ||
center = KeyC( | ||
display = KeyDisplay.TextDisplay(","), | ||
action = KeyAction.CommitText(","), | ||
size = FontSizeVariant.LARGE, | ||
color = ColorVariant.PRIMARY, | ||
), | ||
), | ||
), | ||
listOf( | ||
SPACEBAR_SKINNY_KEY_ITEM, | ||
KeyItemC( | ||
center = KeyC( | ||
display = KeyDisplay.TextDisplay("7"), | ||
action = KeyAction.CommitText("7"), | ||
size = FontSizeVariant.LARGE, | ||
color = ColorVariant.PRIMARY, | ||
), | ||
swipes = mapOf( | ||
SwipeDirection.TOP_LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay("~"), | ||
action = KeyAction.CommitText("~"), | ||
), | ||
SwipeDirection.BOTTOM_RIGHT to KeyC( | ||
display = KeyDisplay.TextDisplay(":"), | ||
action = KeyAction.CommitText(":"), | ||
), | ||
SwipeDirection.BOTTOM_LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay("<"), | ||
action = KeyAction.CommitText("<"), | ||
), | ||
), | ||
), | ||
KeyItemC( | ||
center = KeyC( | ||
display = KeyDisplay.TextDisplay("8"), | ||
action = KeyAction.CommitText("8"), | ||
size = FontSizeVariant.LARGE, | ||
color = ColorVariant.PRIMARY, | ||
), | ||
swipes = mapOf( | ||
SwipeDirection.TOP_LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay("\""), | ||
action = KeyAction.CommitText("\""), | ||
), | ||
SwipeDirection.TOP_RIGHT to KeyC( | ||
display = KeyDisplay.TextDisplay("'"), | ||
action = KeyAction.CommitText("'"), | ||
), | ||
SwipeDirection.BOTTOM_RIGHT to KeyC( | ||
display = KeyDisplay.TextDisplay("-"), | ||
action = KeyAction.CommitText("-"), | ||
), | ||
SwipeDirection.BOTTOM to KeyC( | ||
display = KeyDisplay.TextDisplay("."), | ||
action = KeyAction.CommitText("."), | ||
), | ||
SwipeDirection.BOTTOM_LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay("*"), | ||
action = KeyAction.CommitText("*"), | ||
), | ||
SwipeDirection.LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay(","), | ||
action = KeyAction.CommitText(","), | ||
), | ||
), | ||
), | ||
KeyItemC( | ||
center = KeyC( | ||
display = KeyDisplay.TextDisplay("9"), | ||
action = KeyAction.CommitText("9"), | ||
size = FontSizeVariant.LARGE, | ||
color = ColorVariant.PRIMARY, | ||
), | ||
swipes = mapOf( | ||
SwipeDirection.TOP to KeyC( | ||
display = KeyDisplay.TextDisplay("&"), | ||
action = KeyAction.CommitText("&"), | ||
), | ||
SwipeDirection.TOP_RIGHT to KeyC( | ||
display = KeyDisplay.TextDisplay("°"), | ||
action = KeyAction.CommitText("°"), | ||
), | ||
SwipeDirection.BOTTOM_RIGHT to KeyC( | ||
display = KeyDisplay.TextDisplay(">"), | ||
action = KeyAction.CommitText(">"), | ||
), | ||
SwipeDirection.BOTTOM_LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay(";"), | ||
action = KeyAction.CommitText(";"), | ||
), | ||
SwipeDirection.LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay("#"), | ||
action = KeyAction.CommitText("#"), | ||
), | ||
), | ||
), | ||
KeyItemC( | ||
center = KeyC( | ||
display = KeyDisplay.TextDisplay("0"), | ||
action = KeyAction.CommitText("0"), | ||
size = FontSizeVariant.LARGE, | ||
color = ColorVariant.PRIMARY, | ||
), | ||
), | ||
), | ||
listOf( | ||
KeyItemC( | ||
center = KeyC( | ||
display = KeyDisplay.IconDisplay(Icons.Outlined.Abc), | ||
action = KeyAction.ToggleNumericMode(false), | ||
size = FontSizeVariant.LARGE, | ||
color = ColorVariant.PRIMARY, | ||
), | ||
backgroundColor = ColorVariant.SURFACE_VARIANT, | ||
), | ||
BACKSPACE_TYPESPLIT_SHIFTED_KEY_ITEM, | ||
RETURN_KEY_ITEM, | ||
), | ||
), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters