-
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.
Add Hebrew layout based on letter position guidelines (#335)
- Loading branch information
1 parent
fd8859b
commit 2270cb7
Showing
3 changed files
with
253 additions
and
0 deletions.
There are no files selected for viewing
250 changes: 250 additions & 0 deletions
250
app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyHEv1.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,250 @@ | ||
package com.dessalines.thumbkey.keyboards | ||
|
||
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.KeyboardMode | ||
import com.dessalines.thumbkey.utils.SwipeDirection | ||
import com.dessalines.thumbkey.utils.SwipeNWay | ||
|
||
val THUMBKEY_HE_V1_MAIN = KeyboardC( | ||
listOf( | ||
listOf( | ||
KeyItemC( | ||
center = KeyC( | ||
display = KeyDisplay.TextDisplay("מ"), | ||
action = KeyAction.CommitText("מ"), | ||
size = FontSizeVariant.LARGE, | ||
color = ColorVariant.PRIMARY, | ||
), | ||
swipes = mapOf( | ||
SwipeDirection.BOTTOM_RIGHT to KeyC( | ||
display = KeyDisplay.TextDisplay("נ"), | ||
action = KeyAction.CommitText("נ"), | ||
), | ||
), | ||
swipeType = SwipeNWay.FOUR_WAY_DIAGONAL, | ||
), | ||
KeyItemC( | ||
center = KeyC( | ||
display = KeyDisplay.TextDisplay("ב"), | ||
action = KeyAction.CommitText("ב"), | ||
size = FontSizeVariant.LARGE, | ||
color = ColorVariant.PRIMARY, | ||
), | ||
swipes = mapOf( | ||
SwipeDirection.BOTTOM to KeyC( | ||
display = KeyDisplay.TextDisplay("ע"), | ||
action = KeyAction.CommitText("ע"), | ||
), | ||
), | ||
swipeType = SwipeNWay.TWO_WAY_VERTICAL, | ||
), | ||
KeyItemC( | ||
center = KeyC( | ||
display = KeyDisplay.TextDisplay("א"), | ||
action = KeyAction.CommitText("א"), | ||
size = FontSizeVariant.LARGE, | ||
color = ColorVariant.PRIMARY, | ||
), | ||
swipes = mapOf( | ||
SwipeDirection.BOTTOM_LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay("כ"), | ||
action = KeyAction.CommitText("כ"), | ||
), | ||
), | ||
swipeType = SwipeNWay.FOUR_WAY_DIAGONAL, | ||
), | ||
SETTINGS_KEY_ITEM, | ||
), | ||
listOf( | ||
KeyItemC( | ||
center = KeyC( | ||
display = KeyDisplay.TextDisplay("ת"), | ||
action = KeyAction.CommitText("ת"), | ||
size = FontSizeVariant.LARGE, | ||
color = ColorVariant.PRIMARY, | ||
), | ||
swipes = mapOf( | ||
SwipeDirection.RIGHT to KeyC( | ||
display = KeyDisplay.TextDisplay("ם"), | ||
action = KeyAction.CommitText("ם"), | ||
), | ||
SwipeDirection.LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay("ץ"), | ||
action = KeyAction.CommitText("ץ"), | ||
), | ||
), | ||
swipeType = SwipeNWay.TWO_WAY_HORIZONTAL, | ||
), | ||
KeyItemC( | ||
center = KeyC( | ||
display = KeyDisplay.TextDisplay("ל"), | ||
action = KeyAction.CommitText("ל"), | ||
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 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("ו"), | ||
action = KeyAction.CommitText("ו"), | ||
size = FontSizeVariant.LARGE, | ||
color = ColorVariant.PRIMARY, | ||
), | ||
swipes = mapOf( | ||
SwipeDirection.LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay("פ"), | ||
action = KeyAction.CommitText("פ"), | ||
), | ||
SwipeDirection.RIGHT to KeyC( | ||
display = KeyDisplay.TextDisplay("ף"), | ||
action = KeyAction.CommitText("ף"), | ||
), | ||
), | ||
swipeType = SwipeNWay.TWO_WAY_HORIZONTAL, | ||
), | ||
NUMERIC_KEY_ITEM, | ||
), | ||
listOf( | ||
KeyItemC( | ||
center = KeyC( | ||
display = KeyDisplay.TextDisplay("ר"), | ||
action = KeyAction.CommitText("ר"), | ||
size = FontSizeVariant.LARGE, | ||
color = ColorVariant.PRIMARY, | ||
), | ||
swipes = mapOf( | ||
SwipeDirection.TOP_RIGHT to KeyC( | ||
display = KeyDisplay.TextDisplay("ש"), | ||
action = KeyAction.CommitText("ש"), | ||
), | ||
SwipeDirection.BOTTOM_RIGHT to KeyC( | ||
display = KeyDisplay.TextDisplay("”"), | ||
action = KeyAction.CommitText("”"), | ||
color = ColorVariant.MUTED, | ||
), | ||
), | ||
swipeType = SwipeNWay.FOUR_WAY_DIAGONAL, | ||
), | ||
KeyItemC( | ||
center = KeyC( | ||
display = KeyDisplay.TextDisplay("ה"), | ||
action = KeyAction.CommitText("ה"), | ||
size = FontSizeVariant.LARGE, | ||
color = ColorVariant.PRIMARY, | ||
), | ||
swipes = mapOf( | ||
SwipeDirection.TOP_LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay("״"), | ||
action = KeyAction.CommitText("״"), | ||
color = ColorVariant.MUTED, | ||
), | ||
SwipeDirection.TOP to KeyC( | ||
display = KeyDisplay.TextDisplay("ד"), | ||
action = KeyAction.CommitText("ד"), | ||
), | ||
SwipeDirection.TOP_RIGHT to KeyC( | ||
display = KeyDisplay.TextDisplay("׳"), | ||
action = KeyAction.CommitText("׳"), | ||
color = ColorVariant.MUTED, | ||
), | ||
SwipeDirection.RIGHT to KeyC( | ||
display = KeyDisplay.TextDisplay("–"), | ||
action = KeyAction.CommitText("–"), | ||
color = ColorVariant.MUTED, | ||
), | ||
SwipeDirection.BOTTOM_RIGHT to 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, | ||
), | ||
SwipeDirection.LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay("־"), | ||
action = KeyAction.CommitText("־"), | ||
color = ColorVariant.MUTED, | ||
), | ||
), | ||
), | ||
KeyItemC( | ||
center = KeyC( | ||
display = KeyDisplay.TextDisplay("י"), | ||
action = KeyAction.CommitText("י"), | ||
size = FontSizeVariant.LARGE, | ||
color = ColorVariant.PRIMARY, | ||
), | ||
swipes = mapOf( | ||
SwipeDirection.TOP_LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay("ח"), | ||
action = KeyAction.CommitText("ח"), | ||
), | ||
SwipeDirection.BOTTOM_LEFT to KeyC( | ||
display = KeyDisplay.TextDisplay("’"), | ||
action = KeyAction.CommitText("’"), | ||
color = ColorVariant.MUTED, | ||
), | ||
), | ||
swipeType = SwipeNWay.FOUR_WAY_DIAGONAL, | ||
), | ||
BACKSPACE_KEY_ITEM, | ||
), | ||
listOf( | ||
SPACEBAR_KEY_ITEM, | ||
RETURN_KEY_ITEM, | ||
), | ||
), | ||
) | ||
|
||
val THUMBKEY_HE_V1_KEYBOARD_MODES: Map<KeyboardMode, KeyboardC> = mapOf( | ||
KeyboardMode.MAIN to THUMBKEY_HE_V1_MAIN, | ||
KeyboardMode.SHIFTED to THUMBKEY_HE_V1_MAIN, | ||
KeyboardMode.NUMERIC to NUMERIC_KEYBOARD, | ||
) |
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