|
| 1 | +package com.dessalines.thumbkey.keyboards |
| 2 | + |
| 3 | +import com.dessalines.thumbkey.utils.ColorVariant |
| 4 | +import com.dessalines.thumbkey.utils.FontSizeVariant |
| 5 | +import com.dessalines.thumbkey.utils.KeyAction |
| 6 | +import com.dessalines.thumbkey.utils.KeyC |
| 7 | +import com.dessalines.thumbkey.utils.KeyDisplay |
| 8 | +import com.dessalines.thumbkey.utils.KeyItemC |
| 9 | +import com.dessalines.thumbkey.utils.KeyboardC |
| 10 | +import com.dessalines.thumbkey.utils.KeyboardMode |
| 11 | +import com.dessalines.thumbkey.utils.SwipeDirection |
| 12 | + |
| 13 | +val MESSAGEASE_HE_MAIN = KeyboardC( |
| 14 | + arrayOf( |
| 15 | + arrayOf( |
| 16 | + KeyItemC( |
| 17 | + center = KeyC( |
| 18 | + display = KeyDisplay.TextDisplay("ר"), |
| 19 | + action = KeyAction.CommitText("ר"), |
| 20 | + size = FontSizeVariant.LARGE, |
| 21 | + color = ColorVariant.PRIMARY |
| 22 | + ), |
| 23 | + swipes = mapOf( |
| 24 | + SwipeDirection.BOTTOM_RIGHT to KeyC( |
| 25 | + display = KeyDisplay.TextDisplay("ן"), |
| 26 | + action = KeyAction.CommitText("ן") |
| 27 | + ) |
| 28 | + ) |
| 29 | + ), |
| 30 | + KeyItemC( |
| 31 | + center = KeyC( |
| 32 | + display = KeyDisplay.TextDisplay("ב"), |
| 33 | + action = KeyAction.CommitText("ב"), |
| 34 | + size = FontSizeVariant.LARGE, |
| 35 | + color = ColorVariant.PRIMARY |
| 36 | + ), |
| 37 | + swipes = mapOf( |
| 38 | + SwipeDirection.BOTTOM to KeyC( |
| 39 | + display = KeyDisplay.TextDisplay("ג"), |
| 40 | + action = KeyAction.CommitText("ג") |
| 41 | + ) |
| 42 | + ) |
| 43 | + ), |
| 44 | + KeyItemC( |
| 45 | + center = KeyC( |
| 46 | + display = KeyDisplay.TextDisplay("א"), |
| 47 | + action = KeyAction.CommitText("א"), |
| 48 | + size = FontSizeVariant.LARGE, |
| 49 | + color = ColorVariant.PRIMARY |
| 50 | + ), |
| 51 | + swipes = mapOf( |
| 52 | + SwipeDirection.BOTTOM_LEFT to KeyC( |
| 53 | + display = KeyDisplay.TextDisplay("צ"), |
| 54 | + action = KeyAction.CommitText("צ") |
| 55 | + ), |
| 56 | + SwipeDirection.LEFT to KeyC( |
| 57 | + display = KeyDisplay.TextDisplay("ץ"), |
| 58 | + action = KeyAction.CommitText("ץ") |
| 59 | + ) |
| 60 | + ) |
| 61 | + ), |
| 62 | + SETTINGS_KEY_ITEM |
| 63 | + ), |
| 64 | + arrayOf( |
| 65 | + KeyItemC( |
| 66 | + center = KeyC( |
| 67 | + display = KeyDisplay.TextDisplay("מ"), |
| 68 | + action = KeyAction.CommitText("מ"), |
| 69 | + size = FontSizeVariant.LARGE, |
| 70 | + color = ColorVariant.PRIMARY |
| 71 | + ), |
| 72 | + swipes = mapOf( |
| 73 | + SwipeDirection.RIGHT to KeyC( |
| 74 | + display = KeyDisplay.TextDisplay("ם"), |
| 75 | + action = KeyAction.CommitText("ם") |
| 76 | + ), |
| 77 | + SwipeDirection.BOTTOM_RIGHT to KeyC( |
| 78 | + display = KeyDisplay.TextDisplay("ך"), |
| 79 | + action = KeyAction.CommitText("ך") |
| 80 | + ) |
| 81 | + ) |
| 82 | + ), |
| 83 | + KeyItemC( |
| 84 | + center = KeyC( |
| 85 | + display = KeyDisplay.TextDisplay("י"), |
| 86 | + action = KeyAction.CommitText("י"), |
| 87 | + size = FontSizeVariant.LARGE, |
| 88 | + color = ColorVariant.PRIMARY |
| 89 | + ), |
| 90 | + swipes = mapOf( |
| 91 | + SwipeDirection.TOP_LEFT to KeyC( |
| 92 | + display = KeyDisplay.TextDisplay("ק"), |
| 93 | + action = KeyAction.CommitText("ק") |
| 94 | + ), |
| 95 | + SwipeDirection.TOP to KeyC( |
| 96 | + display = KeyDisplay.TextDisplay("ח"), |
| 97 | + action = KeyAction.CommitText("ח") |
| 98 | + ), |
| 99 | + SwipeDirection.TOP_RIGHT to KeyC( |
| 100 | + display = KeyDisplay.TextDisplay("פ"), |
| 101 | + action = KeyAction.CommitText("פ") |
| 102 | + ), |
| 103 | + SwipeDirection.RIGHT to KeyC( |
| 104 | + display = KeyDisplay.TextDisplay("ד"), |
| 105 | + action = KeyAction.CommitText("ד") |
| 106 | + ), |
| 107 | + SwipeDirection.BOTTOM_RIGHT to KeyC( |
| 108 | + display = KeyDisplay.TextDisplay("ש"), |
| 109 | + action = KeyAction.CommitText("ש") |
| 110 | + ), |
| 111 | + SwipeDirection.BOTTOM to KeyC( |
| 112 | + display = KeyDisplay.TextDisplay("נ"), |
| 113 | + action = KeyAction.CommitText("נ") |
| 114 | + ), |
| 115 | + SwipeDirection.BOTTOM_LEFT to KeyC( |
| 116 | + display = KeyDisplay.TextDisplay("כ"), |
| 117 | + action = KeyAction.CommitText("כ") |
| 118 | + ), |
| 119 | + SwipeDirection.LEFT to KeyC( |
| 120 | + display = KeyDisplay.TextDisplay("ע"), |
| 121 | + action = KeyAction.CommitText("ע") |
| 122 | + ) |
| 123 | + ) |
| 124 | + ), |
| 125 | + KeyItemC( |
| 126 | + center = KeyC( |
| 127 | + display = KeyDisplay.TextDisplay("ו"), |
| 128 | + action = KeyAction.CommitText("ו"), |
| 129 | + size = FontSizeVariant.LARGE, |
| 130 | + color = ColorVariant.PRIMARY |
| 131 | + ), |
| 132 | + swipes = mapOf( |
| 133 | + SwipeDirection.TOP_LEFT to KeyC( |
| 134 | + display = KeyDisplay.TextDisplay("ף"), |
| 135 | + action = KeyAction.CommitText("ף") |
| 136 | + ) |
| 137 | + ) |
| 138 | + ), |
| 139 | + NUMERIC_KEY_ITEM |
| 140 | + ), |
| 141 | + arrayOf( |
| 142 | + KeyItemC( |
| 143 | + center = KeyC( |
| 144 | + display = KeyDisplay.TextDisplay("ת"), |
| 145 | + action = KeyAction.CommitText("ת"), |
| 146 | + size = FontSizeVariant.LARGE, |
| 147 | + color = ColorVariant.PRIMARY |
| 148 | + ), |
| 149 | + swipes = mapOf( |
| 150 | + SwipeDirection.TOP_RIGHT to KeyC( |
| 151 | + display = KeyDisplay.TextDisplay("ז"), |
| 152 | + action = KeyAction.CommitText("ז") |
| 153 | + ) |
| 154 | + ) |
| 155 | + ), |
| 156 | + KeyItemC( |
| 157 | + center = KeyC( |
| 158 | + display = KeyDisplay.TextDisplay("ה"), |
| 159 | + action = KeyAction.CommitText("ה"), |
| 160 | + size = FontSizeVariant.LARGE, |
| 161 | + color = ColorVariant.PRIMARY |
| 162 | + ), |
| 163 | + swipes = mapOf( |
| 164 | + SwipeDirection.TOP to KeyC( |
| 165 | + display = KeyDisplay.TextDisplay("ס"), |
| 166 | + action = KeyAction.CommitText("ס") |
| 167 | + ), |
| 168 | + SwipeDirection.TOP_RIGHT to KeyC( |
| 169 | + display = KeyDisplay.TextDisplay("'"), |
| 170 | + action = KeyAction.CommitText("'"), |
| 171 | + color = ColorVariant.MUTED |
| 172 | + ), |
| 173 | + SwipeDirection.BOTTOM_RIGHT to KeyC( |
| 174 | + display = KeyDisplay.TextDisplay("-"), |
| 175 | + action = KeyAction.CommitText("-"), |
| 176 | + color = ColorVariant.MUTED |
| 177 | + ), |
| 178 | + SwipeDirection.BOTTOM to KeyC( |
| 179 | + display = KeyDisplay.TextDisplay("."), |
| 180 | + action = KeyAction.CommitText("."), |
| 181 | + color = ColorVariant.MUTED |
| 182 | + ), |
| 183 | + SwipeDirection.BOTTOM_LEFT to KeyC( |
| 184 | + display = KeyDisplay.TextDisplay(","), |
| 185 | + action = KeyAction.CommitText(","), |
| 186 | + color = ColorVariant.MUTED |
| 187 | + ) |
| 188 | + ) |
| 189 | + ), |
| 190 | + KeyItemC( |
| 191 | + center = KeyC( |
| 192 | + display = KeyDisplay.TextDisplay("ל"), |
| 193 | + action = KeyAction.CommitText("ל"), |
| 194 | + size = FontSizeVariant.LARGE, |
| 195 | + color = ColorVariant.PRIMARY |
| 196 | + ), |
| 197 | + swipes = mapOf( |
| 198 | + SwipeDirection.TOP_LEFT to KeyC( |
| 199 | + display = KeyDisplay.TextDisplay("ט"), |
| 200 | + action = KeyAction.CommitText("ט") |
| 201 | + ) |
| 202 | + ) |
| 203 | + ), |
| 204 | + BACKSPACE_KEY_ITEM |
| 205 | + ), |
| 206 | + arrayOf( |
| 207 | + SPACEBAR_KEY_ITEM, |
| 208 | + RETURN_KEY_ITEM |
| 209 | + ) |
| 210 | + ) |
| 211 | +) |
| 212 | + |
| 213 | +val MESSAGEEASE_HE_KEYBOARD_MODES: Map<KeyboardMode, KeyboardC> = mapOf( |
| 214 | + KeyboardMode.MAIN to MESSAGEASE_HE_MAIN, |
| 215 | + KeyboardMode.SHIFTED to MESSAGEASE_HE_MAIN, |
| 216 | + KeyboardMode.NUMERIC to NUMERIC_KEYBOARD |
| 217 | +) |
0 commit comments