diff --git a/README.md b/README.md index 3f84eb271..85063f234 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@

- +

Thumb-Key

diff --git a/app/build.gradle b/app/build.gradle index 29d006d9e..71fd0a7bc 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -105,4 +105,7 @@ dependencies { implementation "androidx.activity:activity-compose:1.7.2" implementation "com.louiscad.splitties:splitties-systemservices:3.0.0" implementation "com.louiscad.splitties:splitties-views:3.0.0" + + // Emoji Picker + implementation "androidx.emoji2:emoji2-emojipicker:1.4.0" } diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/CommonKeys.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/CommonKeys.kt index 9d201549c..f84175dbe 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/CommonKeys.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/CommonKeys.kt @@ -2,8 +2,11 @@ package com.dessalines.thumbkey.keyboards import android.view.KeyEvent import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.outlined.Abc import androidx.compose.material.icons.outlined.ArrowDropDown import androidx.compose.material.icons.outlined.ArrowDropUp +import androidx.compose.material.icons.outlined.ContentCopy +import androidx.compose.material.icons.outlined.ContentCut import androidx.compose.material.icons.outlined.ContentPaste import androidx.compose.material.icons.outlined.Copyright import androidx.compose.material.icons.outlined.Keyboard @@ -12,9 +15,12 @@ import androidx.compose.material.icons.outlined.KeyboardCapslock import androidx.compose.material.icons.outlined.KeyboardReturn import androidx.compose.material.icons.outlined.Language import androidx.compose.material.icons.outlined.LinearScale +import androidx.compose.material.icons.outlined.Mood import androidx.compose.material.icons.outlined.Numbers +import androidx.compose.material.icons.outlined.Redo import androidx.compose.material.icons.outlined.SelectAll import androidx.compose.material.icons.outlined.Settings +import androidx.compose.material.icons.outlined.Undo import com.dessalines.thumbkey.utils.ColorVariant import com.dessalines.thumbkey.utils.FontSizeVariant import com.dessalines.thumbkey.utils.KeyAction @@ -25,17 +31,6 @@ import com.dessalines.thumbkey.utils.SlideType import com.dessalines.thumbkey.utils.SwipeDirection import com.dessalines.thumbkey.utils.SwipeNWay -val SETTINGS_KEY_ITEM = - KeyItemC( - center = KeyC( - display = KeyDisplay.IconDisplay(Icons.Outlined.Settings), - action = KeyAction.GotoSettings, - size = FontSizeVariant.LARGE, - color = ColorVariant.SECONDARY, - ), - backgroundColor = ColorVariant.SURFACE_VARIANT, - ) - val NUMERIC_KEY_ITEM = KeyItemC( center = KeyC( @@ -47,13 +42,28 @@ val NUMERIC_KEY_ITEM = swipeType = SwipeNWay.EIGHT_WAY, swipes = mapOf( SwipeDirection.TOP to KeyC( - display = KeyDisplay.IconDisplay(Icons.Outlined.SelectAll), - action = KeyAction.SelectAndCopyAll, + display = KeyDisplay.IconDisplay(Icons.Outlined.ContentCopy), + action = KeyAction.Copy, color = ColorVariant.MUTED, ), SwipeDirection.TOP_LEFT to KeyC( - display = KeyDisplay.IconDisplay(Icons.Outlined.Keyboard), - action = KeyAction.SwitchIME, + display = KeyDisplay.IconDisplay(Icons.Outlined.SelectAll), + action = KeyAction.SelectAll, + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_RIGHT to KeyC( + display = KeyDisplay.IconDisplay(Icons.Outlined.ContentCut), + action = KeyAction.Cut, + color = ColorVariant.MUTED, + ), + SwipeDirection.LEFT to KeyC( + display = KeyDisplay.IconDisplay(Icons.Outlined.Undo), + action = KeyAction.Undo, + color = ColorVariant.MUTED, + ), + SwipeDirection.RIGHT to KeyC( + display = KeyDisplay.IconDisplay(Icons.Outlined.Redo), + action = KeyAction.Redo, color = ColorVariant.MUTED, ), SwipeDirection.BOTTOM to KeyC( @@ -61,6 +71,30 @@ val NUMERIC_KEY_ITEM = action = KeyAction.Paste, color = ColorVariant.MUTED, ), + ), + backgroundColor = ColorVariant.SURFACE_VARIANT, + ) + +val EMOJI_KEY_ITEM = + KeyItemC( + center = KeyC( + display = KeyDisplay.IconDisplay(Icons.Outlined.Mood), + action = KeyAction.ToggleEmojiMode(true), + size = FontSizeVariant.LARGE, + color = ColorVariant.SECONDARY, + ), + swipeType = SwipeNWay.FOUR_WAY_CROSS, + swipes = mapOf( + SwipeDirection.TOP to KeyC( + display = KeyDisplay.IconDisplay(Icons.Outlined.Settings), + action = KeyAction.GotoSettings, + color = ColorVariant.MUTED, + ), + SwipeDirection.BOTTOM to KeyC( + display = KeyDisplay.IconDisplay(Icons.Outlined.Keyboard), + action = KeyAction.SwitchIME, + color = ColorVariant.MUTED, + ), SwipeDirection.LEFT to KeyC( display = KeyDisplay.IconDisplay(Icons.Outlined.Language), action = KeyAction.SwitchLanguage, @@ -75,6 +109,17 @@ val NUMERIC_KEY_ITEM = backgroundColor = ColorVariant.SURFACE_VARIANT, ) +val EMOJI_BACK_KEY_ITEM = + KeyItemC( + center = KeyC( + display = KeyDisplay.IconDisplay(Icons.Outlined.Abc), + action = KeyAction.ToggleEmojiMode(false), + size = FontSizeVariant.LARGE, + color = ColorVariant.PRIMARY, + ), + backgroundColor = ColorVariant.SURFACE_VARIANT, + ) + val BACKSPACE_KEY_ITEM = KeyItemC( center = KeyC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseDE.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseDE.kt index 4acc756e3..fda03f294 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseDE.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseDE.kt @@ -100,7 +100,7 @@ val MESSAGEEASE_DE_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -416,7 +416,7 @@ val MESSAGEEASE_DE_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseEN.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseEN.kt index 79fc2541c..c2efc5b9e 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseEN.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseEN.kt @@ -64,7 +64,7 @@ val MESSAGEEASE_EN_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -272,7 +272,7 @@ val MESSAGEEASE_EN_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseENSymbols.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseENSymbols.kt index 2d987a6fe..51cfdbc25 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseENSymbols.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseENSymbols.kt @@ -120,7 +120,7 @@ val MESSAGEEASE_EN_SYMBOLS_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -482,7 +482,7 @@ val MESSAGEEASE_EN_SYMBOLS_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseES.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseES.kt index 2558f4000..0e8b0bde5 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseES.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseES.kt @@ -83,7 +83,7 @@ val MESSAGEEASE_ES_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -329,7 +329,7 @@ val MESSAGEEASE_ES_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseFR.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseFR.kt index 79bf620c9..31b28a4ab 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseFR.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseFR.kt @@ -70,7 +70,7 @@ val MESSAGEEASE_FR_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -304,7 +304,7 @@ val MESSAGEEASE_FR_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseHE.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseHE.kt index 82111c6d2..36bfbcf65 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseHE.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseHE.kt @@ -62,7 +62,7 @@ val MESSAGEASE_HE_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseIT.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseIT.kt index 321239a52..6ac6dce0f 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseIT.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseIT.kt @@ -72,7 +72,7 @@ val MESSAGEEASE_IT_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -302,7 +302,7 @@ val MESSAGEEASE_IT_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseRU.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseRU.kt index 2a0f04c40..4ab5d6012 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseRU.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseRU.kt @@ -76,7 +76,7 @@ val MESSAGEEASE_RU_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -300,7 +300,7 @@ val MESSAGEEASE_RU_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseRUSymbols.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseRUSymbols.kt index e2af202cf..1eecf835f 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseRUSymbols.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/MessageEaseRUSymbols.kt @@ -123,7 +123,7 @@ val MESSAGEEASE_RU_SYMBOLS_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -502,7 +502,7 @@ val MESSAGEEASE_RU_SYMBOLS_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/Numeric.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/Numeric.kt index c81900bdf..fb853ce36 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/Numeric.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/Numeric.kt @@ -92,7 +92,7 @@ val NUMERIC_KEYBOARD = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/T9v1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/T9v1.kt index 01cf8a0cd..9bb5e4b99 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/T9v1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/T9v1.kt @@ -2,6 +2,8 @@ package com.dessalines.thumbkey.keyboards import android.view.KeyEvent import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.outlined.ContentCopy +import androidx.compose.material.icons.outlined.ContentCut import androidx.compose.material.icons.outlined.ContentPaste import androidx.compose.material.icons.outlined.KeyboardReturn import androidx.compose.material.icons.outlined.Language @@ -352,9 +354,19 @@ val T9_V1_MAIN = KeyboardC( color = ColorVariant.SECONDARY, ), swipes = mapOf( - SwipeDirection.TOP_RIGHT to KeyC( + SwipeDirection.TOP_LEFT to KeyC( display = KeyDisplay.IconDisplay(Icons.Outlined.SelectAll), - action = KeyAction.SelectAndCopyAll, + action = KeyAction.SelectAll, + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP to KeyC( + display = KeyDisplay.IconDisplay(Icons.Outlined.ContentCopy), + action = KeyAction.Copy, + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_RIGHT to KeyC( + display = KeyDisplay.IconDisplay(Icons.Outlined.ContentCut), + action = KeyAction.Cut, color = ColorVariant.MUTED, ), SwipeDirection.RIGHT to KeyC( @@ -368,7 +380,7 @@ val T9_V1_MAIN = KeyboardC( ), color = ColorVariant.MUTED, ), - SwipeDirection.BOTTOM_RIGHT to KeyC( + SwipeDirection.BOTTOM to KeyC( display = KeyDisplay.IconDisplay(Icons.Outlined.ContentPaste), action = KeyAction.Paste, color = ColorVariant.MUTED, @@ -895,9 +907,19 @@ val T9_V1_SHIFTED = KeyboardC( color = ColorVariant.SECONDARY, ), swipes = mapOf( - SwipeDirection.TOP_RIGHT to KeyC( + SwipeDirection.TOP_LEFT to KeyC( display = KeyDisplay.IconDisplay(Icons.Outlined.SelectAll), - action = KeyAction.SelectAndCopyAll, + action = KeyAction.SelectAll, + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP to KeyC( + display = KeyDisplay.IconDisplay(Icons.Outlined.ContentCopy), + action = KeyAction.Copy, + color = ColorVariant.MUTED, + ), + SwipeDirection.TOP_RIGHT to KeyC( + display = KeyDisplay.IconDisplay(Icons.Outlined.ContentCut), + action = KeyAction.Cut, color = ColorVariant.MUTED, ), SwipeDirection.RIGHT to KeyC( @@ -911,7 +933,7 @@ val T9_V1_SHIFTED = KeyboardC( ), color = ColorVariant.MUTED, ), - SwipeDirection.BOTTOM_RIGHT to KeyC( + SwipeDirection.BOTTOM to KeyC( display = KeyDisplay.IconDisplay(Icons.Outlined.ContentPaste), action = KeyAction.Paste, color = ColorVariant.MUTED, diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyBGv1Symbols.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyBGv1Symbols.kt index 1d4e86768..6ac985adf 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyBGv1Symbols.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyBGv1Symbols.kt @@ -124,7 +124,7 @@ val THUMBKEY_BG_V1_SYMBOLS = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -515,7 +515,7 @@ val THUMBKEY_BG_V1_SYMBOLS_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyBYv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyBYv1.kt index 0a9c2ab55..9189c5ada 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyBYv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyBYv1.kt @@ -71,7 +71,7 @@ val THUMBKEY_BY_V1_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -314,7 +314,7 @@ val THUMBKEY_BY_V1_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyBYv1Symbols.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyBYv1Symbols.kt index 3e681b4b9..ae89da39d 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyBYv1Symbols.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyBYv1Symbols.kt @@ -123,7 +123,7 @@ val THUMBKEY_BY_V1_SYMBOLS_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -507,7 +507,7 @@ val THUMBKEY_BY_V1_SYMBOLS_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyCZv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyCZv1.kt index 720a4b070..2c25da24f 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyCZv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyCZv1.kt @@ -84,7 +84,7 @@ val THUMBKEY_CZ_V1_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -345,7 +345,7 @@ val THUMBKEY_CZ_V1_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyDAv2.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyDAv2.kt index dcc2f55b5..b2bfcb7b9 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyDAv2.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyDAv2.kt @@ -72,7 +72,7 @@ val THUMBKEY_DA_V1_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -292,7 +292,7 @@ val THUMBKEY_DA_V1_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyDEv2.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyDEv2.kt index 451ecc915..de8d40ece 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyDEv2.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyDEv2.kt @@ -66,7 +66,7 @@ val THUMBKEY_DE_V2_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -289,7 +289,7 @@ val THUMBKEY_DE_V2_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyDEv2MultiLingual.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyDEv2MultiLingual.kt index 160588c54..ffe110d76 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyDEv2MultiLingual.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyDEv2MultiLingual.kt @@ -103,7 +103,7 @@ val THUMBKEY_DE_V2_MULTILINGUAL_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -454,7 +454,7 @@ val THUMBKEY_DE_V2_MULTILINGUAL_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyENv4.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyENv4.kt index 14ec92bec..3397a80cb 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyENv4.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyENv4.kt @@ -64,7 +64,7 @@ val THUMBKEY_EN_V4_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -272,7 +272,7 @@ val THUMBKEY_EN_V4_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyENv4Multi.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyENv4Multi.kt index 2a570faa7..50bd539d0 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyENv4Multi.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyENv4Multi.kt @@ -84,7 +84,7 @@ val THUMBKEY_EN_V4_MULTI_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -362,7 +362,7 @@ val THUMBKEY_EN_V4_MULTI_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyENv4Programmer.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyENv4Programmer.kt index ed4f5c807..533c16419 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyENv4Programmer.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyENv4Programmer.kt @@ -119,7 +119,7 @@ val THUMBKEY_EN_V4_PROGRAMMER = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -452,7 +452,7 @@ val THUMBKEY_EN_V4_PROGRAMMER_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyENv4Symbols.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyENv4Symbols.kt index 7c6d26d8d..12aa1fdc5 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyENv4Symbols.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyENv4Symbols.kt @@ -118,7 +118,7 @@ val THUMBKEY_EN_V4_SYMBOLS = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -476,7 +476,7 @@ val THUMBKEY_EN_V4_SYMBOLS_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyEOENDEv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyEOENDEv1.kt index 85adf90da..05c10c085 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyEOENDEv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyEOENDEv1.kt @@ -88,7 +88,7 @@ val THUMBKEY_EOENDE_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -341,7 +341,7 @@ val THUMBKEY_EOENDE_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyESEOv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyESEOv1.kt index e4bcf6711..8874f54b3 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyESEOv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyESEOv1.kt @@ -74,7 +74,7 @@ val THUMBKEY_ES_EO_V1_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -295,7 +295,7 @@ val THUMBKEY_ES_EO_V1_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyESv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyESv1.kt index 1bf549307..d2e171493 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyESv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyESv1.kt @@ -86,7 +86,7 @@ val THUMBKEY_ES_V1_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -327,7 +327,7 @@ val THUMBKEY_ES_V1_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyEUv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyEUv1.kt index ff61431d5..678222049 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyEUv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyEUv1.kt @@ -64,7 +64,7 @@ val THUMBKEY_EU_V1_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -272,7 +272,7 @@ val THUMBKEY_EU_V1_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyFAv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyFAv1.kt index cff3167da..507e1c528 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyFAv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyFAv1.kt @@ -79,7 +79,7 @@ val THUMBKEY_FA_V1_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyFIv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyFIv1.kt index 21c1b151a..2aab99280 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyFIv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyFIv1.kt @@ -72,7 +72,7 @@ val THUMBKEY_FI_V1_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -292,7 +292,7 @@ val THUMBKEY_FI_V1_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyFIv1Wide.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyFIv1Wide.kt index b721a2c9c..eda54b3c1 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyFIv1Wide.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyFIv1Wide.kt @@ -73,7 +73,7 @@ val THUMBKEY_FI_V1_WIDE_MAIN = KeyboardC( ), ), SPACEBAR_SKINNY_KEY_ITEM, - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -292,7 +292,7 @@ val THUMBKEY_FI_V1_WIDE_SHIFTED = KeyboardC( ), ), SPACEBAR_SKINNY_KEY_ITEM, - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyFRv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyFRv1.kt index 4d814ccb2..c21207c89 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyFRv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyFRv1.kt @@ -85,7 +85,7 @@ val THUMBKEY_FR_V1_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -350,7 +350,7 @@ val THUMBKEY_FR_V1_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyFRv2.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyFRv2.kt index 61cf5317c..3cb6f59e1 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyFRv2.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyFRv2.kt @@ -110,7 +110,7 @@ val THUMBKEY_FR_V2_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -408,7 +408,7 @@ val THUMBKEY_FR_V2_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyGRv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyGRv1.kt index 6164f9df7..3870ce6d4 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyGRv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyGRv1.kt @@ -91,7 +91,7 @@ val THUMBKEY_GR_V1_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -338,7 +338,7 @@ val THUMBKEY_GR_V1_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyHEv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyHEv1.kt index 9142a2562..638d7c1f4 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyHEv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyHEv1.kt @@ -59,7 +59,7 @@ val THUMBKEY_HE_V1_MAIN = KeyboardC( ), swipeType = SwipeNWay.FOUR_WAY_DIAGONAL, ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyHRv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyHRv1.kt index b5c35d380..af88dbe8c 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyHRv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyHRv1.kt @@ -71,7 +71,7 @@ val THUMBKEY_HR_V1_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -296,7 +296,7 @@ val THUMBKEY_HR_V1_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyHRv1Symbols.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyHRv1Symbols.kt index 7247abfab..d8084658c 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyHRv1Symbols.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyHRv1Symbols.kt @@ -124,7 +124,7 @@ val THUMBKEY_HR_V1_SYMBOLS = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -505,7 +505,7 @@ val THUMBKEY_HR_V1_SYMBOLS_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyHUv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyHUv1.kt index 631ad2db2..7dd84d894 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyHUv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyHUv1.kt @@ -88,7 +88,7 @@ val THUMBKEY_HU_V1_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -328,7 +328,7 @@ val THUMBKEY_HU_V1_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyIDv1Symbols.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyIDv1Symbols.kt index 762504648..2fabceb18 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyIDv1Symbols.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyIDv1Symbols.kt @@ -118,7 +118,7 @@ val THUMBKEY_ID_V1_SYMBOLS = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -481,7 +481,7 @@ val THUMBKEY_ID_V1_SYMBOLS_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyIDv1SymbolsNumeric.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyIDv1SymbolsNumeric.kt index 5337a5f00..def823e8b 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyIDv1SymbolsNumeric.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyIDv1SymbolsNumeric.kt @@ -130,7 +130,7 @@ val THUMBKEY_ID_V1_SN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -533,7 +533,7 @@ val THUMBKEY_ID_V1_SN_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyIDv2Symbols.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyIDv2Symbols.kt index b72f3dbfc..43b7984f6 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyIDv2Symbols.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyIDv2Symbols.kt @@ -118,7 +118,7 @@ val THUMBKEY_ID_V2_SYMBOLS = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -481,7 +481,7 @@ val THUMBKEY_ID_V2_SYMBOLS_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyITv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyITv1.kt index 47130c0a8..690a39d4f 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyITv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyITv1.kt @@ -82,7 +82,7 @@ val THUMBKEY_IT_V1_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -334,7 +334,7 @@ val THUMBKEY_IT_V1_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyJAv1Hiragana.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyJAv1Hiragana.kt index 2e0f5dfa4..0ffab6788 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyJAv1Hiragana.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyJAv1Hiragana.kt @@ -95,7 +95,7 @@ val THUMBKEY_JA_V1_HIRAGANA = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -362,7 +362,7 @@ val THUMBKEY_JA_V1_HIRAGANA_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyJAv1Katakana.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyJAv1Katakana.kt index d527dfbd6..ffddbf2ef 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyJAv1Katakana.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyJAv1Katakana.kt @@ -95,7 +95,7 @@ val THUMBKEY_JA_V1_KATAKANA = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -362,7 +362,7 @@ val THUMBKEY_JA_V1_KATAKANA_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyKAv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyKAv1.kt index f250d7b1a..85994bb5e 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyKAv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyKAv1.kt @@ -70,7 +70,7 @@ val THUMBKEY_KA_V1_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyLTv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyLTv1.kt index ae090f3c7..ee1e7a4ea 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyLTv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyLTv1.kt @@ -74,7 +74,7 @@ val THUMBKEY_LT_V1_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -301,7 +301,7 @@ val THUMBKEY_LT_V1_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyLVLTGv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyLVLTGv1.kt index ba00a87b7..f8fff786f 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyLVLTGv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyLVLTGv1.kt @@ -71,7 +71,7 @@ val THUMBKEY_LV_LTG_V1_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -315,7 +315,7 @@ val THUMBKEY_LV_LTG_V1_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyNLv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyNLv1.kt index 6c28abd55..c1a86e857 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyNLv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyNLv1.kt @@ -64,7 +64,7 @@ val THUMBKEY_NL_V1_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -272,7 +272,7 @@ val THUMBKEY_NL_V1_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyNOv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyNOv1.kt index bb6439229..259412686 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyNOv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyNOv1.kt @@ -71,7 +71,7 @@ val THUMBKEY_NO_V1_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -290,7 +290,7 @@ val THUMBKEY_NO_V1_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyPLv2.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyPLv2.kt index 56297dc2a..9e60cd09a 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyPLv2.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyPLv2.kt @@ -71,7 +71,7 @@ val THUMBKEY_PL_V2_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -314,7 +314,7 @@ val THUMBKEY_PL_V2_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyPTv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyPTv1.kt index ca9c46503..716a0a01e 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyPTv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyPTv1.kt @@ -83,7 +83,7 @@ val THUMBKEY_PT_V1_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -348,7 +348,7 @@ val THUMBKEY_PT_V1_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyRUv2.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyRUv2.kt index 6222b807b..4c9e17eda 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyRUv2.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyRUv2.kt @@ -71,7 +71,7 @@ val THUMBKEY_RU_V2_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -319,7 +319,7 @@ val THUMBKEY_RU_V2_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyRUv2Symbols.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyRUv2Symbols.kt index 6110d569a..49960b105 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyRUv2Symbols.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyRUv2Symbols.kt @@ -123,7 +123,7 @@ val THUMBKEY_RU_V2_SYMBOLS_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -512,7 +512,7 @@ val THUMBKEY_RU_V2_SYMBOLS_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeySVv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeySVv1.kt index 2640434f6..7b2899278 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeySVv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeySVv1.kt @@ -67,7 +67,7 @@ val THUMBKEY_SV_V1_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -285,7 +285,7 @@ val THUMBKEY_SV_V1_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyTRv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyTRv1.kt index d1e6c9dad..ad7ec2009 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyTRv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyTRv1.kt @@ -127,7 +127,7 @@ val THUMBKEY_TR_V1 = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -483,7 +483,7 @@ val THUMBKEY_TR_V1_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyUKv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyUKv1.kt index f6064bc2a..1dbc3a23d 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyUKv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/ThumbKeyUKv1.kt @@ -64,7 +64,7 @@ val THUMBKEY_UK_V1_MAIN = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( @@ -297,7 +297,7 @@ val THUMBKEY_UK_V1_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, ), listOf( KeyItemC( diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/TwoHandsENv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/TwoHandsENv1.kt index c8a76fd41..c3bc19ecc 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/TwoHandsENv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/TwoHandsENv1.kt @@ -61,7 +61,7 @@ val TWO_HANDS_EN_V1 = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, KeyItemC( center = KeyC( display = KeyDisplay.TextDisplay("s"), @@ -462,7 +462,7 @@ val TWO_HANDS_EN_V1_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, KeyItemC( center = KeyC( display = KeyDisplay.TextDisplay("S"), diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/TwoHandsHRv1.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/TwoHandsHRv1.kt index e1843a759..7201f47fe 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/TwoHandsHRv1.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/TwoHandsHRv1.kt @@ -68,7 +68,7 @@ val TWO_HANDS_HR_V1 = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, KeyItemC( center = KeyC( display = KeyDisplay.TextDisplay("s"), @@ -503,7 +503,7 @@ val TWO_HANDS_HR_V1_SHIFTED = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, KeyItemC( center = KeyC( display = KeyDisplay.TextDisplay("S"), diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/TwoHandsNumeric.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/TwoHandsNumeric.kt index a606fd7e2..8beb6f596 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/TwoHandsNumeric.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/TwoHandsNumeric.kt @@ -92,7 +92,7 @@ val TWO_HANDS_NUMERIC_KEYBOARD = KeyboardC( ), ), ), - SETTINGS_KEY_ITEM, + EMOJI_KEY_ITEM, KeyItemC( center = KeyC( display = KeyDisplay.TextDisplay("1"), diff --git a/app/src/main/java/com/dessalines/thumbkey/ui/components/keyboard/KeyboardKey.kt b/app/src/main/java/com/dessalines/thumbkey/ui/components/keyboard/KeyboardKey.kt index 44380755a..c12539047 100644 --- a/app/src/main/java/com/dessalines/thumbkey/ui/components/keyboard/KeyboardKey.kt +++ b/app/src/main/java/com/dessalines/thumbkey/ui/components/keyboard/KeyboardKey.kt @@ -77,6 +77,7 @@ fun KeyboardKey( slideEnabled: Boolean, onToggleShiftMode: (enable: Boolean) -> Unit, onToggleNumericMode: (enable: Boolean) -> Unit, + onToggleEmojiMode: (enable: Boolean) -> Unit, onToggleCapsLock: () -> Unit, onAutoCapitalize: (enable: Boolean) -> Unit, onSwitchLanguage: () -> Unit, @@ -162,6 +163,7 @@ fun KeyboardKey( autoCapitalize = autoCapitalize, onToggleShiftMode = onToggleShiftMode, onToggleNumericMode = onToggleNumericMode, + onToggleEmojiMode = onToggleEmojiMode, onToggleCapsLock = onToggleCapsLock, onAutoCapitalize = onAutoCapitalize, onSwitchLanguage = onSwitchLanguage, @@ -210,6 +212,7 @@ fun KeyboardKey( autoCapitalize = autoCapitalize, onToggleShiftMode = onToggleShiftMode, onToggleNumericMode = onToggleNumericMode, + onToggleEmojiMode = onToggleEmojiMode, onToggleCapsLock = onToggleCapsLock, onAutoCapitalize = onAutoCapitalize, onSwitchLanguage = onSwitchLanguage, @@ -232,6 +235,7 @@ fun KeyboardKey( autoCapitalize = autoCapitalize, onToggleShiftMode = onToggleShiftMode, onToggleNumericMode = onToggleNumericMode, + onToggleEmojiMode = onToggleEmojiMode, onToggleCapsLock = onToggleCapsLock, onAutoCapitalize = onAutoCapitalize, onSwitchLanguage = onSwitchLanguage, diff --git a/app/src/main/java/com/dessalines/thumbkey/ui/components/keyboard/KeyboardScreen.kt b/app/src/main/java/com/dessalines/thumbkey/ui/components/keyboard/KeyboardScreen.kt index 75325db63..5311f6873 100644 --- a/app/src/main/java/com/dessalines/thumbkey/ui/components/keyboard/KeyboardScreen.kt +++ b/app/src/main/java/com/dessalines/thumbkey/ui/components/keyboard/KeyboardScreen.kt @@ -4,6 +4,8 @@ import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable @@ -13,7 +15,10 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp +import androidx.compose.ui.viewinterop.AndroidView +import androidx.emoji2.emojipicker.EmojiPickerView import com.dessalines.thumbkey.IMEService import com.dessalines.thumbkey.db.AppSettings import com.dessalines.thumbkey.db.DEFAULT_ANIMATION_HELPER_SPEED @@ -32,6 +37,10 @@ import com.dessalines.thumbkey.db.DEFAULT_SLIDE_SENSITIVITY import com.dessalines.thumbkey.db.DEFAULT_SOUND_ON_TAP import com.dessalines.thumbkey.db.DEFAULT_SPACEBAR_MULTITAPS import com.dessalines.thumbkey.db.DEFAULT_VIBRATE_ON_TAP +import com.dessalines.thumbkey.keyboards.BACKSPACE_KEY_ITEM +import com.dessalines.thumbkey.keyboards.EMOJI_BACK_KEY_ITEM +import com.dessalines.thumbkey.keyboards.NUMERIC_KEY_ITEM +import com.dessalines.thumbkey.keyboards.RETURN_KEY_ITEM import com.dessalines.thumbkey.keyboards.THUMBKEY_EN_V4_MAIN import com.dessalines.thumbkey.utils.KeyAction import com.dessalines.thumbkey.utils.KeyboardLayout @@ -92,69 +101,174 @@ fun KeyboardScreen( val hideLetters = (settings?.hideLetters ?: DEFAULT_HIDE_LETTERS).toBool() val hideSymbols = (settings?.hideSymbols ?: DEFAULT_HIDE_SYMBOLS).toBool() - Box( - contentAlignment = alignment, - modifier = Modifier - .padding(bottom = pushupSizeDp), - ) { - Column( - modifier = Modifier - .background(MaterialTheme.colorScheme.onBackground), + if (mode == KeyboardMode.EMOJI) { + val controllerKeys = listOf(EMOJI_BACK_KEY_ITEM, NUMERIC_KEY_ITEM, BACKSPACE_KEY_ITEM, RETURN_KEY_ITEM) + + val keySize = settings?.keySize ?: DEFAULT_KEY_SIZE + val keyboardHeight = Dp((keySize * controllerKeys.size).toFloat()) + pushupSizeDp + + Row( + modifier = Modifier.fillMaxWidth(), ) { - keyboard.arr.forEach { row -> - Row { - row.forEach { key -> - Column { - KeyboardKey( - key = key, - lastAction = lastAction, - keySize = settings?.keySize ?: DEFAULT_KEY_SIZE, - autoCapitalize = autoCapitalize, - spacebarMultiTaps = spacebarMultiTaps, - keyBorders = keyBorders, - vibrateOnTap = vibrateOnTap, - soundOnTap = soundOnTap, - hideLetters = hideLetters, - hideSymbols = hideSymbols, - capsLock = capsLock, - animationSpeed = settings?.animationSpeed - ?: DEFAULT_ANIMATION_SPEED, - animationHelperSpeed = settings?.animationHelperSpeed - ?: DEFAULT_ANIMATION_HELPER_SPEED, - minSwipeLength = settings?.minSwipeLength ?: DEFAULT_MIN_SWIPE_LENGTH, - slideSensitivity = settings?.slideSensitivity ?: DEFAULT_SLIDE_SENSITIVITY, - slideEnabled = slideEnabled, - onToggleShiftMode = { enable -> - mode = if (enable) { - KeyboardMode.SHIFTED - } else { - capsLock = false - KeyboardMode.MAIN - } - }, - onToggleNumericMode = { enable -> - mode = if (enable) { - KeyboardMode.NUMERIC - } else { - capsLock = false - KeyboardMode.MAIN + Box( + modifier = Modifier.weight(1f), // Take up available space equally + ) { + AndroidView( + // Write the emoji to our text box when we tap one. + factory = { context -> + val emojiPicker = EmojiPickerView(context) + emojiPicker.setOnEmojiPickedListener { + ctx.currentInputConnection.commitText( + it.emoji, + 1, + ) + } + + emojiPicker + }, + modifier = Modifier + .fillMaxWidth() + .height(keyboardHeight) + .background(MaterialTheme.colorScheme.background), + ) + } + + Column() { + controllerKeys.forEach { key -> + Column { + KeyboardKey( + key = key, + lastAction = lastAction, + keySize = settings?.keySize ?: DEFAULT_KEY_SIZE, + autoCapitalize = autoCapitalize, + spacebarMultiTaps = spacebarMultiTaps, + keyBorders = keyBorders, + vibrateOnTap = vibrateOnTap, + soundOnTap = soundOnTap, + hideLetters = hideLetters, + hideSymbols = hideSymbols, + capsLock = capsLock, + animationSpeed = settings?.animationSpeed + ?: DEFAULT_ANIMATION_SPEED, + animationHelperSpeed = settings?.animationHelperSpeed + ?: DEFAULT_ANIMATION_HELPER_SPEED, + minSwipeLength = settings?.minSwipeLength ?: DEFAULT_MIN_SWIPE_LENGTH, + slideSensitivity = settings?.slideSensitivity ?: DEFAULT_SLIDE_SENSITIVITY, + slideEnabled = slideEnabled, + onToggleShiftMode = { enable -> + mode = if (enable) { + KeyboardMode.SHIFTED + } else { + capsLock = false + KeyboardMode.MAIN + } + }, + onToggleNumericMode = { enable -> + mode = if (enable) { + KeyboardMode.NUMERIC + } else { + capsLock = false + KeyboardMode.MAIN + } + }, + onToggleEmojiMode = { enable -> + mode = if (enable) { + KeyboardMode.EMOJI + } else { + KeyboardMode.MAIN + } + }, + onToggleCapsLock = { + capsLock = !capsLock + }, + onAutoCapitalize = { enable -> + if (mode !== KeyboardMode.NUMERIC) { + if (enable) { + mode = KeyboardMode.SHIFTED + } else if (!capsLock) { + mode = KeyboardMode.MAIN } - }, - onToggleCapsLock = { - capsLock = !capsLock - }, - onAutoCapitalize = { enable -> - if (mode !== KeyboardMode.NUMERIC) { - if (enable) { - mode = KeyboardMode.SHIFTED - } else if (!capsLock) { - mode = KeyboardMode.MAIN + } + }, + onSwitchLanguage = onSwitchLanguage, + onSwitchPosition = onSwitchPosition, + ) + } + } + } + } + } else { + Box( + contentAlignment = alignment, + modifier = Modifier + .padding(bottom = pushupSizeDp), + ) { + Column( + modifier = Modifier + .background(MaterialTheme.colorScheme.onBackground), + ) { + keyboard.arr.forEach { row -> + Row { + row.forEach { key -> + Column { + KeyboardKey( + key = key, + lastAction = lastAction, + keySize = settings?.keySize ?: DEFAULT_KEY_SIZE, + autoCapitalize = autoCapitalize, + spacebarMultiTaps = spacebarMultiTaps, + keyBorders = keyBorders, + vibrateOnTap = vibrateOnTap, + soundOnTap = soundOnTap, + hideLetters = hideLetters, + hideSymbols = hideSymbols, + capsLock = capsLock, + animationSpeed = settings?.animationSpeed + ?: DEFAULT_ANIMATION_SPEED, + animationHelperSpeed = settings?.animationHelperSpeed + ?: DEFAULT_ANIMATION_HELPER_SPEED, + minSwipeLength = settings?.minSwipeLength ?: DEFAULT_MIN_SWIPE_LENGTH, + slideSensitivity = settings?.slideSensitivity ?: DEFAULT_SLIDE_SENSITIVITY, + slideEnabled = slideEnabled, + onToggleShiftMode = { enable -> + mode = if (enable) { + KeyboardMode.SHIFTED + } else { + capsLock = false + KeyboardMode.MAIN } - } - }, - onSwitchLanguage = onSwitchLanguage, - onSwitchPosition = onSwitchPosition, - ) + }, + onToggleNumericMode = { enable -> + mode = if (enable) { + KeyboardMode.NUMERIC + } else { + capsLock = false + KeyboardMode.MAIN + } + }, + onToggleEmojiMode = { enable -> + mode = if (enable) { + KeyboardMode.EMOJI + } else { + KeyboardMode.MAIN + } + }, + onToggleCapsLock = { + capsLock = !capsLock + }, + onAutoCapitalize = { enable -> + if (mode !== KeyboardMode.NUMERIC) { + if (enable) { + mode = KeyboardMode.SHIFTED + } else if (!capsLock) { + mode = KeyboardMode.MAIN + } + } + }, + onSwitchLanguage = onSwitchLanguage, + onSwitchPosition = onSwitchPosition, + ) + } } } } diff --git a/app/src/main/java/com/dessalines/thumbkey/utils/Types.kt b/app/src/main/java/com/dessalines/thumbkey/utils/Types.kt index 6840bbd99..1fbdf1ce0 100644 --- a/app/src/main/java/com/dessalines/thumbkey/utils/Types.kt +++ b/app/src/main/java/com/dessalines/thumbkey/utils/Types.kt @@ -40,19 +40,24 @@ sealed class KeyAction { class ReplaceLastText(val text: String, val trimCount: Int = 2) : KeyAction() class ToggleShiftMode(val enable: Boolean) : KeyAction() class ToggleNumericMode(val enable: Boolean) : KeyAction() + class ToggleEmojiMode(val enable: Boolean) : KeyAction() data object DeleteLastWord : KeyAction() data object GotoSettings : KeyAction() data object IMECompleteAction : KeyAction() data object ToggleCapsLock : KeyAction() - data object SelectAndCopyAll : KeyAction() + data object SelectAll : KeyAction() + data object Cut : KeyAction() + data object Copy : KeyAction() data object Paste : KeyAction() + data object Undo : KeyAction() + data object Redo : KeyAction() data object SwitchLanguage : KeyAction() data object SwitchPosition : KeyAction() data object SwitchIME : KeyAction() } enum class KeyboardMode { - MAIN, SHIFTED, NUMERIC + MAIN, SHIFTED, NUMERIC, EMOJI } enum class SwipeDirection { diff --git a/app/src/main/java/com/dessalines/thumbkey/utils/Utils.kt b/app/src/main/java/com/dessalines/thumbkey/utils/Utils.kt index cbdf78437..b8b5838ee 100644 --- a/app/src/main/java/com/dessalines/thumbkey/utils/Utils.kt +++ b/app/src/main/java/com/dessalines/thumbkey/utils/Utils.kt @@ -276,6 +276,7 @@ fun performKeyAction( autoCapitalize: Boolean, onToggleShiftMode: (enable: Boolean) -> Unit, onToggleNumericMode: (enable: Boolean) -> Unit, + onToggleEmojiMode: (enable: Boolean) -> Unit, onToggleCapsLock: () -> Unit, onAutoCapitalize: (enable: Boolean) -> Unit, onSwitchLanguage: () -> Unit, @@ -340,6 +341,12 @@ fun performKeyAction( onToggleNumericMode(enable) } + is KeyAction.ToggleEmojiMode -> { + val enable = action.enable + Log.d(TAG, "Toggling Emoji: $enable") + onToggleEmojiMode(enable) + } + KeyAction.GotoSettings -> { val mainActivityIntent = Intent(ime, MainActivity::class.java) mainActivityIntent.flags = Intent.FLAG_ACTIVITY_NEW_TASK @@ -369,22 +376,32 @@ fun performKeyAction( } KeyAction.ToggleCapsLock -> onToggleCapsLock() - KeyAction.SelectAndCopyAll -> { + KeyAction.SelectAll -> { // Check here for the action #s: // https://developer.android.com/reference/android/R.id - - // Select all - ime.currentInputConnection.performContextMenuAction(16908319) - - // Copy all - ime.currentInputConnection.performContextMenuAction(16908321) - - val copyAllStr = ime.getString(R.string.copy_all) - Toast.makeText(ime, copyAllStr, Toast.LENGTH_SHORT).show() + ime.currentInputConnection.performContextMenuAction(android.R.id.selectAll) } + KeyAction.Cut -> { + ime.currentInputConnection.performContextMenuAction(android.R.id.cut) + } + KeyAction.Copy -> { + ime.currentInputConnection.performContextMenuAction(android.R.id.copy) + val message = ime.getString(R.string.copy) + Toast.makeText(ime, message, Toast.LENGTH_SHORT).show() + } KeyAction.Paste -> { - ime.currentInputConnection.performContextMenuAction(16908322) + ime.currentInputConnection.performContextMenuAction(android.R.id.paste) + } + KeyAction.Undo -> { + ime.currentInputConnection.sendKeyEvent( + KeyEvent(0, 0, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_Z, 0, KeyEvent.META_CTRL_ON), + ) + } + KeyAction.Redo -> { + ime.currentInputConnection.sendKeyEvent( + KeyEvent(0, 0, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_Z, 0, (KeyEvent.META_CTRL_ON or KeyEvent.META_SHIFT_ON)), + ) } KeyAction.SwitchLanguage -> onSwitchLanguage() diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index 5958a6193..4e9733f13 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -47,7 +47,6 @@ Позволи Thumb-Key Избери Thumb-Key Завърши настройването - Копирай Всичко Скриване на буквите Запазване Рамки на клавишите diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml index 048731197..e7f940cea 100644 --- a/app/src/main/res/values-da/strings.xml +++ b/app/src/main/res/values-da/strings.xml @@ -45,7 +45,6 @@ Slå Tommeltast til Vælg Tommeltast Færdigør opsætning - Kopier alt Skjul bogstaver Gem Kanter diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 52e5e0a1c..2e30279a9 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -48,7 +48,6 @@ Aktiviere Thumb-Key Wähle Thumb-Key aus Einrichtung abschliessen - Alles kopieren Buchstaben verstecken Symbole verstecken speichern diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 5c07c5242..6d67575c3 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -53,7 +53,7 @@ Enable Thumb-Key Select Thumb-Key Finish Setup - Copy All + Copied Selected Text Hide Letters Hide Symbols Save diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png index 44dae0846..4df70e84d 100644 Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png and b/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png differ