Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83bef3aee9 | ||
|
|
ef075151fb | ||
|
|
5316e46ba6 | ||
|
|
467fb62067 | ||
|
|
75c59366a9 | ||
|
|
6df6e25b15 | ||
|
|
81d89cad8c | ||
|
|
99954237f7 | ||
|
|
b5e56642fc | ||
|
|
343525f259 | ||
|
|
a5adad714a | ||
|
|
67214cbdf1 | ||
|
|
3a0284f355 | ||
|
|
eecada3118 | ||
|
|
68061f1aac | ||
|
|
c4ac4abd63 |
@@ -19,8 +19,8 @@ android {
|
||||
applicationId "dev.patrickgold.florisboard"
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 29
|
||||
versionCode 22
|
||||
versionName "0.3.3"
|
||||
versionCode 23
|
||||
versionName "0.3.4"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"qwerty": "QWERTY",
|
||||
"qwertz": "QWERTZ",
|
||||
"azerty": "AZERTY",
|
||||
"bepo": "BÉPO",
|
||||
"spanish": "Spanish (QWERTY)",
|
||||
"norwegian": "Norwegian (QWERTY)",
|
||||
"swedish_finnish": "Swedish/Finnish (QWERTY)",
|
||||
|
||||
51
app/src/main/assets/ime/text/characters/bepo.json
Normal file
51
app/src/main/assets/ime/text/characters/bepo.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"type": "characters",
|
||||
"name": "bepo",
|
||||
"authors": [ "salamandar" ],
|
||||
"direction": "ltr",
|
||||
"arrangement": [
|
||||
[
|
||||
{ "code": 98, "label": "b" },
|
||||
{ "code": 233, "label": "é" },
|
||||
{ "code": 112, "label": "p" },
|
||||
{ "code": 111, "label": "o" },
|
||||
{ "code": 232, "label": "è" },
|
||||
{ "code": 118, "label": "v" },
|
||||
{ "code": 100, "label": "d" },
|
||||
{ "code": 108, "label": "l" },
|
||||
{ "code": 106, "label": "j" },
|
||||
{ "code": 122, "label": "z" },
|
||||
{ "code": 119, "label": "w" }
|
||||
],
|
||||
[
|
||||
{ "code": 97, "label": "a" },
|
||||
{ "code": 117, "label": "u" },
|
||||
{ "code": 105, "label": "i" },
|
||||
{ "code": 101, "label": "e" },
|
||||
{ "code": 99, "label": "c" },
|
||||
{ "code": 116, "label": "t" },
|
||||
{ "code": 115, "label": "s" },
|
||||
{ "code": 114, "label": "r" },
|
||||
{ "code": 110, "label": "n" },
|
||||
{ "code": 109, "label": "m" },
|
||||
{ "code": 231, "label": "ç" }
|
||||
],
|
||||
[
|
||||
{ "code": 121, "label": "y" },
|
||||
{ "code": 120, "label": "x" },
|
||||
{ "code": 107, "label": "k" },
|
||||
{ "code": 113, "label": "q", "popup": {
|
||||
"relevant": [
|
||||
{ "code": 8218, "label": "‚" },
|
||||
{ "code": 8216, "label": "‘" },
|
||||
{ "code": 8217, "label": "’" },
|
||||
{ "code": 8249, "label": "‹" },
|
||||
{ "code": 8250, "label": "›" }
|
||||
]
|
||||
} },
|
||||
{ "code": 103, "label": "g" },
|
||||
{ "code": 104, "label": "h" },
|
||||
{ "code": 102, "label": "f" }
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
{
|
||||
"type": "characters/extended_popups",
|
||||
"name": "pt-BR",
|
||||
"authors": [ "rickym7" ],
|
||||
"mapping": {
|
||||
"all": {
|
||||
"a": {
|
||||
"relevant": [
|
||||
{ "code": 228, "label": "ä" },
|
||||
{ "code": 229, "label": "å" },
|
||||
{ "code": 230, "label": "æ" },
|
||||
{ "code": 170, "label": "ª" },
|
||||
{ "code": 225, "label": "á" },
|
||||
{ "code": 227, "label": "ã" },
|
||||
{ "code": 224, "label": "à" },
|
||||
{ "code": 226, "label": "â" }
|
||||
]
|
||||
},
|
||||
"c": {
|
||||
"relevant": [
|
||||
{ "code": 269, "label": "č" },
|
||||
{ "code": 231, "label": "ç" },
|
||||
{ "code": 263, "label": "ć" }
|
||||
]
|
||||
},
|
||||
"e": {
|
||||
"relevant": [
|
||||
{ "code": 275, "label": "ē" },
|
||||
{ "code": 281, "label": "ę" },
|
||||
{ "code": 279, "label": "ė" },
|
||||
{ "code": 235, "label": "ë" },
|
||||
{ "code": 234, "label": "ê" },
|
||||
{ "code": 233, "label": "é" },
|
||||
{ "code": 232, "label": "è" }
|
||||
]
|
||||
},
|
||||
"i": {
|
||||
"relevant": [
|
||||
{ "code": 299, "label": "ī" },
|
||||
{ "code": 239, "label": "ï" },
|
||||
{ "code": 303, "label": "į" },
|
||||
{ "code": 236, "label": "ì" },
|
||||
{ "code": 238, "label": "î" },
|
||||
{ "code": 237, "label": "í" }
|
||||
]
|
||||
},
|
||||
"n": {
|
||||
"relevant": [
|
||||
{ "code": 241, "label": "ñ" },
|
||||
{ "code": 324, "label": "ń" }
|
||||
]
|
||||
},
|
||||
"o": {
|
||||
"relevant": [
|
||||
{ "code": 186, "label": "º" },
|
||||
{ "code": 333, "label": "ō" },
|
||||
{ "code": 248, "label": "ø" },
|
||||
{ "code": 339, "label": "œ" },
|
||||
{ "code": 246, "label": "ö" },
|
||||
{ "code": 242, "label": "ò" },
|
||||
{ "code": 244, "label": "ô" },
|
||||
{ "code": 245, "label": "õ" },
|
||||
{ "code": 243, "label": "ó" }
|
||||
]
|
||||
},
|
||||
"u": {
|
||||
"relevant": [
|
||||
{ "code": 363, "label": "ū" },
|
||||
{ "code": 249, "label": "ù" },
|
||||
{ "code": 251, "label": "û" },
|
||||
{ "code": 252, "label": "ü" },
|
||||
{ "code": 250, "label": "ú" }
|
||||
]
|
||||
},
|
||||
"~right": {
|
||||
"main": { "code": 44, "label": "," },
|
||||
"relevant": [
|
||||
{ "code": 38, "label": "&" },
|
||||
{ "code": 37, "label": "%" },
|
||||
{ "code": 43, "label": "+" },
|
||||
{ "code": 34, "label": "\"" },
|
||||
{ "code": 45, "label": "-" },
|
||||
{ "code": 58, "label": ":" },
|
||||
{ "code": 39, "label": "'" },
|
||||
{ "code": 64, "label": "@" },
|
||||
{ "code": 59, "label": ";" },
|
||||
{ "code": 47, "label": "/" },
|
||||
{ "code": 40, "label": "(" },
|
||||
{ "code": 41, "label": ")" },
|
||||
{ "code": 35, "label": "#" },
|
||||
{ "code": 33, "label": "!" },
|
||||
{ "code": 63, "label": "?" }
|
||||
]
|
||||
}
|
||||
},
|
||||
"uri": {
|
||||
"~right": {
|
||||
"main": { "code": -255, "label": ".com" },
|
||||
"relevant": [
|
||||
{ "code": -255, "label": ".gov" },
|
||||
{ "code": -255, "label": ".edu" },
|
||||
{ "code": -255, "label": ".br" },
|
||||
{ "code": -255, "label": ".org" },
|
||||
{ "code": -255, "label": ".net" }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -215,6 +215,7 @@ class PrefHelper(
|
||||
const val SWIPE_DOWN = "gestures__swipe_down"
|
||||
const val SWIPE_LEFT = "gestures__swipe_left"
|
||||
const val SWIPE_RIGHT = "gestures__swipe_right"
|
||||
const val SPACE_BAR_LONG_PRESS = "gestures__space_bar_long_press"
|
||||
const val SPACE_BAR_SWIPE_LEFT = "gestures__space_bar_swipe_left"
|
||||
const val SPACE_BAR_SWIPE_RIGHT = "gestures__space_bar_swipe_right"
|
||||
const val SPACE_BAR_SWIPE_UP = "gestures__space_bar_swipe_up"
|
||||
@@ -235,6 +236,9 @@ class PrefHelper(
|
||||
var swipeRight: SwipeAction
|
||||
get() = SwipeAction.fromString(prefHelper.getPref(SWIPE_RIGHT, "no_action"))
|
||||
set(v) = prefHelper.setPref(SWIPE_RIGHT, v)
|
||||
var spaceBarLongPress: SwipeAction
|
||||
get() = SwipeAction.fromString(prefHelper.getPref(SPACE_BAR_LONG_PRESS, "no_action"))
|
||||
set(v) = prefHelper.setPref(SPACE_BAR_LONG_PRESS, v)
|
||||
var spaceBarSwipeUp: SwipeAction
|
||||
get() = SwipeAction.fromString(prefHelper.getPref(SPACE_BAR_SWIPE_UP, "no_action"))
|
||||
set(v) = prefHelper.setPref(SPACE_BAR_SWIPE_UP, v)
|
||||
|
||||
@@ -16,17 +16,9 @@
|
||||
|
||||
package dev.patrickgold.florisboard.ime.popup
|
||||
|
||||
import android.content.Context
|
||||
import com.github.michaelbull.result.Err
|
||||
import com.github.michaelbull.result.Ok
|
||||
import com.github.michaelbull.result.Result
|
||||
import com.squareup.moshi.Moshi
|
||||
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
|
||||
import dev.patrickgold.florisboard.ime.extension.Asset
|
||||
import dev.patrickgold.florisboard.ime.text.key.KeyData
|
||||
import dev.patrickgold.florisboard.ime.text.key.KeyTypeAdapter
|
||||
import dev.patrickgold.florisboard.ime.text.key.KeyVariation
|
||||
import dev.patrickgold.florisboard.ime.text.key.KeyVariationAdapter
|
||||
|
||||
/**
|
||||
* An object which maps each base key to its extended popups. This can be done for each
|
||||
@@ -48,29 +40,5 @@ class PopupExtension(
|
||||
) : Asset {
|
||||
companion object : Asset.Companion<PopupExtension> {
|
||||
override fun empty() = PopupExtension("", "", listOf(), mapOf())
|
||||
|
||||
override fun fromFile(context: Context, path: String): Result<PopupExtension, Throwable> {
|
||||
return try {
|
||||
val raw = context.assets.open(path).bufferedReader().use { it.readText() }
|
||||
val asset = fromJsonString(raw)
|
||||
if (asset != null) {
|
||||
Ok(asset)
|
||||
} else {
|
||||
Err(NullPointerException())
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Err(e)
|
||||
}
|
||||
}
|
||||
|
||||
fun fromJsonString(json: String): PopupExtension? {
|
||||
val moshi = Moshi.Builder()
|
||||
.add(KotlinJsonAdapterFactory())
|
||||
.add(KeyTypeAdapter())
|
||||
.add(KeyVariationAdapter())
|
||||
.build()
|
||||
val layoutAdapter = moshi.adapter(PopupExtension::class.java)
|
||||
return layoutAdapter.fromJson(json)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,6 +64,10 @@ class PopupManager<T_KBD: View, T_KV: View>(
|
||||
val isShowingExtendedPopup: Boolean
|
||||
get() = popupViewExt.isShowing
|
||||
|
||||
companion object {
|
||||
const val POPUP_EXTENSION_PATH_REL: String = "ime/text/characters/extended_popups"
|
||||
}
|
||||
|
||||
init {
|
||||
keyPopupWidth = keyboardView.resources.getDimension(R.dimen.key_width).toInt()
|
||||
keyPopupHeight = keyboardView.resources.getDimension(R.dimen.key_height).toInt()
|
||||
|
||||
@@ -309,11 +309,17 @@ class TextInputManager private constructor() : CoroutineScope by MainScope(),
|
||||
fun executeSwipeAction(swipeAction: SwipeAction) {
|
||||
when (swipeAction) {
|
||||
SwipeAction.DELETE_WORD -> handleDeleteWord()
|
||||
SwipeAction.INSERT_SPACE -> handleSpace()
|
||||
SwipeAction.MOVE_CURSOR_DOWN -> handleArrow(KeyCode.ARROW_DOWN)
|
||||
SwipeAction.MOVE_CURSOR_UP -> handleArrow(KeyCode.ARROW_UP)
|
||||
SwipeAction.MOVE_CURSOR_LEFT -> handleArrow(KeyCode.ARROW_LEFT)
|
||||
SwipeAction.MOVE_CURSOR_RIGHT -> handleArrow(KeyCode.ARROW_RIGHT)
|
||||
SwipeAction.MOVE_CURSOR_START_OF_LINE -> handleArrow(KeyCode.MOVE_HOME)
|
||||
SwipeAction.MOVE_CURSOR_END_OF_LINE -> handleArrow(KeyCode.MOVE_END)
|
||||
SwipeAction.SHIFT -> handleShift()
|
||||
SwipeAction.SHOW_INPUT_METHOD_PICKER -> sendKeyPress(
|
||||
KeyData(type = KeyType.FUNCTION, code = KeyCode.SHOW_INPUT_METHOD_PICKER)
|
||||
)
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
@@ -363,6 +369,8 @@ class TextInputManager private constructor() : CoroutineScope by MainScope(),
|
||||
* Handles a [KeyCode.DELETE] event.
|
||||
*/
|
||||
private fun handleDelete() {
|
||||
hasCapsRecentlyChanged = false
|
||||
hasSpaceRecentlyPressed = false
|
||||
isManualSelectionMode = false
|
||||
isManualSelectionModeLeft = false
|
||||
isManualSelectionModeRight = false
|
||||
@@ -373,6 +381,8 @@ class TextInputManager private constructor() : CoroutineScope by MainScope(),
|
||||
* Handles a [KeyCode.DELETE_WORD] event.
|
||||
*/
|
||||
private fun handleDeleteWord() {
|
||||
hasCapsRecentlyChanged = false
|
||||
hasSpaceRecentlyPressed = false
|
||||
isManualSelectionMode = false
|
||||
isManualSelectionModeLeft = false
|
||||
isManualSelectionModeRight = false
|
||||
@@ -383,6 +393,8 @@ class TextInputManager private constructor() : CoroutineScope by MainScope(),
|
||||
* Handles a [KeyCode.ENTER] event.
|
||||
*/
|
||||
private fun handleEnter() {
|
||||
hasCapsRecentlyChanged = false
|
||||
hasSpaceRecentlyPressed = false
|
||||
if (activeEditorInstance.imeOptions.flagNoEnterAction) {
|
||||
activeEditorInstance.performEnter()
|
||||
} else {
|
||||
@@ -663,6 +675,8 @@ class TextInputManager private constructor() : CoroutineScope by MainScope(),
|
||||
activeEditorInstance.commitText(tld)
|
||||
}
|
||||
else -> {
|
||||
hasCapsRecentlyChanged = false
|
||||
hasSpaceRecentlyPressed = false
|
||||
var text = keyData.code.toChar().toString()
|
||||
text = when (caps) {
|
||||
true -> text.toUpperCase(Locale.getDefault())
|
||||
|
||||
@@ -27,11 +27,15 @@ enum class SwipeAction {
|
||||
DELETE_WORD,
|
||||
DELETE_WORDS_PRECISELY,
|
||||
HIDE_KEYBOARD,
|
||||
INSERT_SPACE,
|
||||
MOVE_CURSOR_UP,
|
||||
MOVE_CURSOR_DOWN,
|
||||
MOVE_CURSOR_LEFT,
|
||||
MOVE_CURSOR_RIGHT,
|
||||
MOVE_CURSOR_START_OF_LINE,
|
||||
MOVE_CURSOR_END_OF_LINE,
|
||||
SHIFT,
|
||||
SHOW_INPUT_METHOD_PICKER,
|
||||
SWITCH_TO_PREV_SUBTYPE,
|
||||
SWITCH_TO_NEXT_SUBTYPE,
|
||||
SWITCH_TO_PREV_KEYBOARD;
|
||||
|
||||
@@ -26,6 +26,36 @@ import kotlin.math.*
|
||||
* Wrapper class which holds all enums, interfaces and classes for detecting a swipe gesture.
|
||||
*/
|
||||
abstract class SwipeGesture {
|
||||
companion object {
|
||||
/**
|
||||
* Returns a numeric value for a given [DistanceThreshold], based on the values defined in
|
||||
* the resources dimens.xml file.
|
||||
*/
|
||||
fun numericValue(context: Context, of: DistanceThreshold): Double {
|
||||
return when (of) {
|
||||
DistanceThreshold.VERY_SHORT -> context.resources.getDimension(R.dimen.gesture_distance_threshold_very_short)
|
||||
DistanceThreshold.SHORT -> context.resources.getDimension(R.dimen.gesture_distance_threshold_short)
|
||||
DistanceThreshold.NORMAL -> context.resources.getDimension(R.dimen.gesture_distance_threshold_normal)
|
||||
DistanceThreshold.LONG -> context.resources.getDimension(R.dimen.gesture_distance_threshold_long)
|
||||
DistanceThreshold.VERY_LONG -> context.resources.getDimension(R.dimen.gesture_distance_threshold_very_long)
|
||||
}.toDouble()
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a numeric value for a given [VelocityThreshold], based on the values defined in
|
||||
* the resources dimens.xml file.
|
||||
*/
|
||||
fun numericValue(context: Context, of: VelocityThreshold): Double {
|
||||
return when (of) {
|
||||
VelocityThreshold.VERY_SLOW -> context.resources.getInteger(R.integer.gesture_velocity_threshold_very_slow)
|
||||
VelocityThreshold.SLOW -> context.resources.getInteger(R.integer.gesture_velocity_threshold_slow)
|
||||
VelocityThreshold.NORMAL -> context.resources.getInteger(R.integer.gesture_velocity_threshold_normal)
|
||||
VelocityThreshold.FAST -> context.resources.getInteger(R.integer.gesture_velocity_threshold_fast)
|
||||
VelocityThreshold.VERY_FAST -> context.resources.getInteger(R.integer.gesture_velocity_threshold_very_fast)
|
||||
}.toDouble()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Class which detects swipes based on given [MotionEvent]s. Only supports single-finger swipes
|
||||
* and ignores additional pointers provided, if any.
|
||||
@@ -50,14 +80,20 @@ abstract class SwipeGesture {
|
||||
}
|
||||
MotionEvent.ACTION_MOVE -> {
|
||||
eventList.add(MotionEvent.obtainNoHistory(event))
|
||||
val firstEvent = eventList[indexFirst]
|
||||
val lastEvent = eventList[indexLastMoveRecognized]
|
||||
val diffX = event.x - lastEvent.x
|
||||
val diffY = event.y - lastEvent.y
|
||||
val distanceThresholdNV = numericValue(distanceThreshold) / 4.0f
|
||||
val distanceThresholdNV = numericValue(context, distanceThreshold) / 4.0f
|
||||
return if (abs(diffX) > distanceThresholdNV || abs(diffY) > distanceThresholdNV) {
|
||||
indexLastMoveRecognized = eventList.size - 1
|
||||
val direction = detectDirection(diffX.toDouble(), diffY.toDouble())
|
||||
listener.onSwipe(direction, Type.TOUCH_MOVE)
|
||||
listener.onSwipe(Event(
|
||||
direction = direction,
|
||||
type = Type.TOUCH_MOVE,
|
||||
diffX = event.x - firstEvent.x,
|
||||
diffY = event.y - firstEvent.y
|
||||
))
|
||||
} else {
|
||||
false
|
||||
}
|
||||
@@ -67,7 +103,7 @@ abstract class SwipeGesture {
|
||||
val firstEvent = eventList[indexFirst]
|
||||
val diffX = event.x - firstEvent.x
|
||||
val diffY = event.y - firstEvent.y
|
||||
val distanceThresholdNV = numericValue(distanceThreshold)
|
||||
val distanceThresholdNV = numericValue(context, distanceThreshold)
|
||||
/*val velocityThresholdNV = numericValue(velocityThreshold)
|
||||
val velocity =
|
||||
((convertPixelsToDp(
|
||||
@@ -78,7 +114,12 @@ abstract class SwipeGesture {
|
||||
// return if ((abs(diffX) > distanceThresholdNV || abs(diffY) > distanceThresholdNV) && velocity >= velocityThresholdNV) {
|
||||
return if ((abs(diffX) > distanceThresholdNV || abs(diffY) > distanceThresholdNV)) {
|
||||
val direction = detectDirection(diffX.toDouble(), diffY.toDouble())
|
||||
listener.onSwipe(direction, Type.TOUCH_UP)
|
||||
listener.onSwipe(Event(
|
||||
direction = direction,
|
||||
type = Type.TOUCH_UP,
|
||||
diffX = diffX,
|
||||
diffY = diffY
|
||||
))
|
||||
} else {
|
||||
false
|
||||
}
|
||||
@@ -144,38 +185,10 @@ abstract class SwipeGesture {
|
||||
indexFirst = 0
|
||||
indexLastMoveRecognized = 0
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a numeric value for a given [DistanceThreshold], based on the values defined in
|
||||
* the resources dimens.xml file.
|
||||
*/
|
||||
private fun numericValue(of: DistanceThreshold): Double {
|
||||
return when (of) {
|
||||
DistanceThreshold.VERY_SHORT -> context.resources.getDimension(R.dimen.gesture_distance_threshold_very_short)
|
||||
DistanceThreshold.SHORT -> context.resources.getDimension(R.dimen.gesture_distance_threshold_short)
|
||||
DistanceThreshold.NORMAL -> context.resources.getDimension(R.dimen.gesture_distance_threshold_normal)
|
||||
DistanceThreshold.LONG -> context.resources.getDimension(R.dimen.gesture_distance_threshold_long)
|
||||
DistanceThreshold.VERY_LONG -> context.resources.getDimension(R.dimen.gesture_distance_threshold_very_long)
|
||||
}.toDouble()
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a numeric value for a given [VelocityThreshold], based on the values defined in
|
||||
* the resources dimens.xml file.
|
||||
*/
|
||||
private fun numericValue(of: VelocityThreshold): Double {
|
||||
return when (of) {
|
||||
VelocityThreshold.VERY_SLOW -> context.resources.getInteger(R.integer.gesture_velocity_threshold_very_slow)
|
||||
VelocityThreshold.SLOW -> context.resources.getInteger(R.integer.gesture_velocity_threshold_slow)
|
||||
VelocityThreshold.NORMAL -> context.resources.getInteger(R.integer.gesture_velocity_threshold_normal)
|
||||
VelocityThreshold.FAST -> context.resources.getInteger(R.integer.gesture_velocity_threshold_fast)
|
||||
VelocityThreshold.VERY_FAST -> context.resources.getInteger(R.integer.gesture_velocity_threshold_very_fast)
|
||||
}.toDouble()
|
||||
}
|
||||
}
|
||||
|
||||
interface Listener {
|
||||
fun onSwipe(direction: Direction, type: Type): Boolean
|
||||
fun onSwipe(event: Event): Boolean
|
||||
}
|
||||
|
||||
enum class Direction {
|
||||
@@ -189,6 +202,13 @@ abstract class SwipeGesture {
|
||||
LEFT,
|
||||
}
|
||||
|
||||
data class Event(
|
||||
val direction: Direction,
|
||||
val type: Type,
|
||||
val diffX: Float,
|
||||
val diffY: Float
|
||||
)
|
||||
|
||||
enum class Type {
|
||||
TOUCH_UP,
|
||||
TOUCH_MOVE;
|
||||
|
||||
@@ -101,7 +101,7 @@ class KeyView(
|
||||
private var themeValueCache: ThemeValueCache = ThemeValueCache()
|
||||
|
||||
var florisboard: FlorisBoard? = null
|
||||
private val swipeGestureDetector = SwipeGesture.Detector(context, this)
|
||||
val swipeGestureDetector = SwipeGesture.Detector(context, this)
|
||||
var touchHitBox: Rect = Rect(-1, -1, -1, -1)
|
||||
|
||||
init {
|
||||
@@ -152,7 +152,7 @@ class KeyView(
|
||||
keyHintMode = prefs.keyboard.hintedNumberRowMode
|
||||
}
|
||||
if (prefs.keyboard.hintedSymbolsMode != KeyHintMode.DISABLED && data.popup.hint?.type == KeyType.CHARACTER) {
|
||||
keyHintMode = prefs.keyboard.hintedNumberRowMode
|
||||
keyHintMode = prefs.keyboard.hintedSymbolsMode
|
||||
}
|
||||
|
||||
updateKeyPressedBackground()
|
||||
@@ -250,12 +250,7 @@ class KeyView(
|
||||
keyboardView.popupManager.extend(this, keyHintMode)
|
||||
}
|
||||
if (data.code == KeyCode.SPACE) {
|
||||
florisboard?.textInputManager?.sendKeyPress(
|
||||
KeyData(
|
||||
type = KeyType.FUNCTION,
|
||||
code = KeyCode.SHOW_INPUT_METHOD_PICKER,
|
||||
)
|
||||
)
|
||||
florisboard?.executeSwipeAction(prefs.gestures.spaceBarLongPress)
|
||||
shouldBlockNextKeyCode = true
|
||||
}
|
||||
}
|
||||
@@ -313,46 +308,32 @@ class KeyView(
|
||||
* Swipe event handler. Listens to touch_move left/right swipes and triggers the swipe action
|
||||
* defined in the prefs.
|
||||
*/
|
||||
override fun onSwipe(direction: SwipeGesture.Direction, type: SwipeGesture.Type): Boolean {
|
||||
override fun onSwipe(event: SwipeGesture.Event): Boolean {
|
||||
return when (data.code) {
|
||||
KeyCode.DELETE -> when (type) {
|
||||
SwipeGesture.Type.TOUCH_MOVE -> when (direction) {
|
||||
SwipeGesture.Direction.LEFT -> when (prefs.gestures.deleteKeySwipeLeft) {
|
||||
SwipeAction.DELETE_CHARACTERS_PRECISELY -> {
|
||||
florisboard?.activeEditorInstance?.apply {
|
||||
setSelection(
|
||||
if (selection.start > 0) { selection.start - 1 } else { selection.start },
|
||||
selection.end
|
||||
)
|
||||
}
|
||||
hasTriggeredGestureMove = true
|
||||
shouldBlockNextKeyCode = true
|
||||
true
|
||||
KeyCode.DELETE -> when (event.type) {
|
||||
SwipeGesture.Type.TOUCH_MOVE -> when (prefs.gestures.deleteKeySwipeLeft) {
|
||||
SwipeAction.DELETE_CHARACTERS_PRECISELY -> {
|
||||
val charWidth = SwipeGesture.numericValue(context, swipeGestureDetector.distanceThreshold) / 4.0f
|
||||
florisboard?.activeEditorInstance?.apply {
|
||||
setSelection(
|
||||
(selection.end - (event.diffX.times(-1) / charWidth).toInt()).coerceIn(0, selection.end),
|
||||
selection.end
|
||||
)
|
||||
}
|
||||
SwipeAction.DELETE_WORDS_PRECISELY -> {
|
||||
hasTriggeredGestureMove = true
|
||||
shouldBlockNextKeyCode = true
|
||||
true
|
||||
}
|
||||
SwipeAction.DELETE_WORDS_PRECISELY -> when (event.direction) {
|
||||
SwipeGesture.Direction.LEFT -> {
|
||||
florisboard?.activeEditorInstance?.apply {
|
||||
leftAppendWordToSelection()
|
||||
}
|
||||
|
||||
hasTriggeredGestureMove = true
|
||||
shouldBlockNextKeyCode = true
|
||||
true
|
||||
}
|
||||
else -> false
|
||||
}
|
||||
SwipeGesture.Direction.RIGHT -> when (prefs.gestures.deleteKeySwipeLeft) {
|
||||
SwipeAction.DELETE_CHARACTERS_PRECISELY -> {
|
||||
florisboard?.activeEditorInstance?.apply {
|
||||
setSelection(
|
||||
if (selection.start < selection.end) { selection.start + 1 } else { selection.start },
|
||||
selection.end
|
||||
)
|
||||
}
|
||||
shouldBlockNextKeyCode = true
|
||||
true
|
||||
}
|
||||
|
||||
SwipeAction.DELETE_WORDS_PRECISELY -> {
|
||||
SwipeGesture.Direction.RIGHT -> {
|
||||
florisboard?.activeEditorInstance?.apply {
|
||||
leftPopWordFromSelection()
|
||||
}
|
||||
@@ -365,8 +346,8 @@ class KeyView(
|
||||
}
|
||||
else -> false
|
||||
}
|
||||
KeyCode.SPACE -> when (type) {
|
||||
SwipeGesture.Type.TOUCH_MOVE -> when (direction) {
|
||||
KeyCode.SPACE -> when (event.type) {
|
||||
SwipeGesture.Type.TOUCH_MOVE -> when (event.direction) {
|
||||
SwipeGesture.Direction.UP -> {
|
||||
florisboard?.executeSwipeAction(prefs.gestures.spaceBarSwipeUp)
|
||||
shouldBlockNextKeyCode = true
|
||||
@@ -397,25 +378,30 @@ class KeyView(
|
||||
* by Devunwired
|
||||
*/
|
||||
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
||||
desiredWidth = when (keyboardView.computedLayout?.mode) {
|
||||
desiredWidth = (keyboardView.desiredKeyWidth * when (keyboardView.computedLayout?.mode) {
|
||||
KeyboardMode.NUMERIC,
|
||||
KeyboardMode.PHONE,
|
||||
KeyboardMode.PHONE2 -> (keyboardView.desiredKeyWidth * 2.68f).toInt()
|
||||
KeyboardMode.PHONE2 -> 2.68f
|
||||
KeyboardMode.NUMERIC_ADVANCED -> when (data.code) {
|
||||
44, 46 -> keyboardView.desiredKeyWidth
|
||||
KeyCode.VIEW_SYMBOLS, 61 -> (keyboardView.desiredKeyWidth * 1.34f).toInt()
|
||||
else -> (keyboardView.desiredKeyWidth * 1.56f).toInt()
|
||||
44, 46 -> 1.00f
|
||||
KeyCode.VIEW_SYMBOLS, 61 -> 1.34f
|
||||
else -> 1.56f
|
||||
}
|
||||
else -> when (data.code) {
|
||||
KeyCode.SHIFT,
|
||||
KeyCode.DELETE ->
|
||||
if ((keyboardView.computedLayout?.arrangement?.get(2)?.size ?: 0) > 10) {
|
||||
1.12f
|
||||
} else {
|
||||
1.56f
|
||||
}
|
||||
KeyCode.VIEW_CHARACTERS,
|
||||
KeyCode.VIEW_SYMBOLS,
|
||||
KeyCode.VIEW_SYMBOLS2,
|
||||
KeyCode.DELETE,
|
||||
KeyCode.ENTER -> (keyboardView.desiredKeyWidth * 1.56f).toInt()
|
||||
else -> keyboardView.desiredKeyWidth
|
||||
KeyCode.ENTER -> 1.56f
|
||||
else -> 1.00f
|
||||
}
|
||||
}
|
||||
}).toInt()
|
||||
desiredHeight = keyboardView.desiredKeyHeight
|
||||
|
||||
val widthMode = MeasureSpec.getMode(widthMeasureSpec)
|
||||
|
||||
@@ -103,6 +103,7 @@ class KeyboardView : LinearLayout, FlorisBoard.EventListener, SwipeGesture.Liste
|
||||
}
|
||||
if (!isPreviewMode) {
|
||||
themeManager.requestThemeUpdate(this)
|
||||
onWindowShown()
|
||||
} else {
|
||||
updateVisibility()
|
||||
}
|
||||
@@ -138,6 +139,18 @@ class KeyboardView : LinearLayout, FlorisBoard.EventListener, SwipeGesture.Liste
|
||||
distanceThreshold = prefs.gestures.swipeDistanceThreshold
|
||||
velocityThreshold = prefs.gestures.swipeVelocityThreshold
|
||||
}
|
||||
for (row in children) {
|
||||
if (row is ViewGroup) {
|
||||
for (keyView in row.children) {
|
||||
if (keyView is KeyView) {
|
||||
keyView.swipeGestureDetector.apply {
|
||||
distanceThreshold = prefs.gestures.swipeDistanceThreshold
|
||||
velocityThreshold = prefs.gestures.swipeVelocityThreshold
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -244,10 +257,10 @@ class KeyboardView : LinearLayout, FlorisBoard.EventListener, SwipeGesture.Liste
|
||||
* Swipe event handler. Listens to touch_up swipes and executes the swipe action defined for it
|
||||
* in the prefs.
|
||||
*/
|
||||
override fun onSwipe(direction: SwipeGesture.Direction, type: SwipeGesture.Type): Boolean {
|
||||
override fun onSwipe(event: SwipeGesture.Event): Boolean {
|
||||
return when {
|
||||
initialKeyCode == KeyCode.DELETE -> {
|
||||
if (type == SwipeGesture.Type.TOUCH_UP && direction == SwipeGesture.Direction.LEFT &&
|
||||
if (event.type == SwipeGesture.Type.TOUCH_UP && event.direction == SwipeGesture.Direction.LEFT &&
|
||||
prefs.gestures.deleteKeySwipeLeft == SwipeAction.DELETE_WORD) {
|
||||
florisboard?.executeSwipeAction(prefs.gestures.deleteKeySwipeLeft)
|
||||
true
|
||||
@@ -256,9 +269,9 @@ class KeyboardView : LinearLayout, FlorisBoard.EventListener, SwipeGesture.Liste
|
||||
}
|
||||
}
|
||||
initialKeyCode > KeyCode.SPACE && !popupManager.isShowingExtendedPopup -> when {
|
||||
!prefs.glide.enabled -> when (type) {
|
||||
!prefs.glide.enabled -> when (event.type) {
|
||||
SwipeGesture.Type.TOUCH_UP -> {
|
||||
val swipeAction = when (direction) {
|
||||
val swipeAction = when (event.direction) {
|
||||
SwipeGesture.Direction.UP -> prefs.gestures.swipeUp
|
||||
SwipeGesture.Direction.DOWN -> prefs.gestures.swipeDown
|
||||
SwipeGesture.Direction.LEFT -> prefs.gestures.swipeLeft
|
||||
|
||||
@@ -18,11 +18,16 @@ package dev.patrickgold.florisboard.ime.text.layout
|
||||
|
||||
import android.content.Context
|
||||
import com.github.michaelbull.result.getOr
|
||||
import com.github.michaelbull.result.onSuccess
|
||||
import com.squareup.moshi.Moshi
|
||||
import com.squareup.moshi.kotlin.reflect.KotlinJsonAdapterFactory
|
||||
import dev.patrickgold.florisboard.ime.core.PrefHelper
|
||||
import dev.patrickgold.florisboard.ime.core.Subtype
|
||||
import dev.patrickgold.florisboard.ime.extension.AssetManager
|
||||
import dev.patrickgold.florisboard.ime.extension.AssetRef
|
||||
import dev.patrickgold.florisboard.ime.extension.AssetSource
|
||||
import dev.patrickgold.florisboard.ime.popup.PopupExtension
|
||||
import dev.patrickgold.florisboard.ime.popup.PopupManager
|
||||
import dev.patrickgold.florisboard.ime.popup.PopupSet
|
||||
import dev.patrickgold.florisboard.ime.text.key.*
|
||||
import dev.patrickgold.florisboard.ime.text.keyboard.KeyboardMode
|
||||
@@ -36,6 +41,7 @@ private typealias KMS = Pair<KeyboardMode, Subtype>
|
||||
* Class which manages layout loading and caching.
|
||||
*/
|
||||
class LayoutManager(private val context: Context) : CoroutineScope by MainScope() {
|
||||
private val assetManager: AssetManager = AssetManager.default()
|
||||
private val computedLayoutCache: HashMap<KMS, Deferred<ComputedLayoutData>> = hashMapOf()
|
||||
|
||||
/**
|
||||
@@ -65,9 +71,21 @@ class LayoutManager(private val context: Context) : CoroutineScope by MainScope(
|
||||
}
|
||||
|
||||
private fun loadExtendedPopups(subtype: Subtype? = null): PopupExtension {
|
||||
val lang = subtype?.locale?.language ?: "\$default"
|
||||
val map = PopupExtension.fromFile(context, "ime/text/characters/extended_popups/$lang.json")
|
||||
return map.getOr(PopupExtension.empty())
|
||||
val langTagRef = AssetRef(
|
||||
source = AssetSource.Assets,
|
||||
path = PopupManager.POPUP_EXTENSION_PATH_REL + "/" + (subtype?.locale?.toLanguageTag() ?: "\$default") + ".json"
|
||||
)
|
||||
val langRef = AssetRef(
|
||||
source = AssetSource.Assets,
|
||||
path = PopupManager.POPUP_EXTENSION_PATH_REL + "/" + (subtype?.locale?.language ?: "\$default") + ".json"
|
||||
)
|
||||
assetManager.loadAsset(langTagRef, PopupExtension::class.java).onSuccess {
|
||||
return it
|
||||
}
|
||||
assetManager.loadAsset(langRef, PopupExtension::class.java).onSuccess {
|
||||
return it
|
||||
}
|
||||
return PopupExtension.empty()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -53,7 +53,7 @@ open class Theme(
|
||||
) : Asset {
|
||||
companion object : Asset.Companion<Theme> {
|
||||
private val VALIDATION_REGEX_THEME_LABEL = """^.+${'$'}""".toRegex()
|
||||
private val VALIDATION_REGEX_GROUP_NAME = """^[a-zA-Z]+${'$'}""".toRegex()
|
||||
private val VALIDATION_REGEX_GROUP_NAME = """^[a-zA-Z]+((:[a-zA-Z]+)|(::[a-zA-Z]+)|(:[a-zA-Z]+:[a-zA-Z]+))?${'$'}""".toRegex()
|
||||
private val VALIDATION_REGEX_ATTR_NAME = """^[a-zA-Z]+${'$'}""".toRegex()
|
||||
|
||||
/**
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
<string name="pref__glide__enabled__summary" comment="Preference summary">أكتب كلمة بتمرير إصبعك عبر حروفها</string>
|
||||
<string name="pref__glide__show_trail__label" comment="Preference title">[NYI] إظهار آثار التمرير</string>
|
||||
<string name="pref__glide__show_trail__summary" comment="Preference summary">سوف يختفي بعد كل كلمة</string>
|
||||
<string name="pref__gestures__title" comment="Preference group title">الإيماءات</string>
|
||||
<string name="pref__gestures__general_title" comment="Preference group title">الإيماءات</string>
|
||||
<string name="pref__gestures__swipe_action__no_action" comment="Preference value for swipe action">بدون إجراء</string>
|
||||
<string name="pref__gestures__swipe_action__delete_characters_precisely" comment="Preference value for swipe action">حذف الحروف بدقة</string>
|
||||
<string name="pref__gestures__swipe_action__delete_word" comment="Preference value for swipe action">حذف الكلمة الحالية</string>
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
<string name="pref__glide__enabled__summary" comment="Preference summary">Zadejte slovo posunutím prstu jeho písmeny</string>
|
||||
<string name="pref__glide__show_trail__label" comment="Preference title">[NYI] Zobrazit sestupovou stopu</string>
|
||||
<string name="pref__glide__show_trail__summary" comment="Preference summary">Zmizí po každém slově</string>
|
||||
<string name="pref__gestures__title" comment="Preference group title">Gesto</string>
|
||||
<string name="pref__gestures__general_title" comment="Preference group title">Gesto</string>
|
||||
<string name="pref__gestures__swipe_action__no_action" comment="Preference value for swipe action">Žádná akce</string>
|
||||
<string name="pref__gestures__swipe_action__delete_characters_precisely" comment="Preference value for swipe action">Smazat znaky přesně</string>
|
||||
<string name="pref__gestures__swipe_action__delete_word" comment="Preference value for swipe action">Smazat aktuální slovo</string>
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
<string name="pref__glide__enabled__summary" comment="Preference summary">Skriv ord ved at stryge fingeren igennem bogstaver</string>
|
||||
<string name="pref__glide__show_trail__label" comment="Preference title">[NYI] Vis glidespor</string>
|
||||
<string name="pref__glide__show_trail__summary" comment="Preference summary">Vil forsvinde efter hvert ord</string>
|
||||
<string name="pref__gestures__title" comment="Preference group title">Bevægelser</string>
|
||||
<string name="pref__gestures__general_title" comment="Preference group title">Bevægelser</string>
|
||||
<string name="pref__gestures__swipe_action__no_action" comment="Preference value for swipe action">Ingen handling</string>
|
||||
<string name="pref__gestures__swipe_action__delete_characters_precisely" comment="Preference value for swipe action">Slet tegn præcist</string>
|
||||
<string name="pref__gestures__swipe_action__delete_word" comment="Preference value for swipe action">Slet nuværende ord</string>
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
<string name="pref__glide__enabled__summary" comment="Preference summary">Durch Gleiten über die Buchstaben Wort eingeben</string>
|
||||
<string name="pref__glide__show_trail__label" comment="Preference title">[NYI] Bewegungsspur anzeigen</string>
|
||||
<string name="pref__glide__show_trail__summary" comment="Preference summary">Wird jeweils nach einem Wort ausgeblendet</string>
|
||||
<string name="pref__gestures__title" comment="Preference group title">Gesten</string>
|
||||
<string name="pref__gestures__general_title" comment="Preference group title">Gesten</string>
|
||||
<string name="pref__gestures__swipe_action__no_action" comment="Preference value for swipe action">Keine Aktion</string>
|
||||
<string name="pref__gestures__swipe_action__delete_characters_precisely" comment="Preference value for swipe action">Einzelne Zeichen exakt löschen</string>
|
||||
<string name="pref__gestures__swipe_action__delete_word" comment="Preference value for swipe action">Aktuelles Wort löschen</string>
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
<string name="pref__glide__enabled__summary" comment="Preference summary">Πληκτρολογήστε μία λέξη με ολίσθηση του δαχτύλου μέσα από τα γράμματά της</string>
|
||||
<string name="pref__glide__show_trail__label" comment="Preference title">[NYI] Εμφάνιση διαδρομής ολίσθησης</string>
|
||||
<string name="pref__glide__show_trail__summary" comment="Preference summary">Θα εξαφανίζεται μετά από κάθε λέξη</string>
|
||||
<string name="pref__gestures__title" comment="Preference group title">Κινήσεις</string>
|
||||
<string name="pref__gestures__general_title" comment="Preference group title">Κινήσεις</string>
|
||||
<string name="pref__gestures__swipe_action__no_action" comment="Preference value for swipe action">Καμία ενέργεια</string>
|
||||
<string name="pref__gestures__swipe_action__delete_characters_precisely" comment="Preference value for swipe action">Διαγραφή χαρακτήρων με ακρίβεια</string>
|
||||
<string name="pref__gestures__swipe_action__delete_word" comment="Preference value for swipe action">Διαγραφή της τρέχουσας λέξης</string>
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<string name="pref__keyboard__height_factor__custom" comment="Preference value">Laŭmenda</string>
|
||||
<string name="pref__keyboard__height_factor_custom__label" comment="Preference title">Laŭmenda klavaro alteca valora</string>
|
||||
<string name="pref__keyboard__group_keypress__label" comment="Preference group title">Klavaĵo ekdepremi</string>
|
||||
<string name="pref__gestures__title" comment="Preference group title">Gestoj</string>
|
||||
<string name="pref__gestures__general_title" comment="Preference group title">Gestoj</string>
|
||||
<string name="pref__gestures__swipe_action__no_action" comment="Preference value for swipe action">Neniu ago</string>
|
||||
<string name="pref__gestures__swipe_up__label" comment="Preference title">Ŝovumi supre</string>
|
||||
<string name="pref__gestures__swipe_down__label" comment="Preference title">Ŝovumi sube</string>
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
<string name="pref__glide__enabled__summary" comment="Preference summary">Escriba una palabra deslizando su dedo a través de sus letras</string>
|
||||
<string name="pref__glide__show_trail__label" comment="Preference title">[NYI] Mostrar recorrido del deslizamiento</string>
|
||||
<string name="pref__glide__show_trail__summary" comment="Preference summary">Desaparecerá después de cada palabra</string>
|
||||
<string name="pref__gestures__title" comment="Preference group title">Gestos</string>
|
||||
<string name="pref__gestures__general_title" comment="Preference group title">Gestos</string>
|
||||
<string name="pref__gestures__swipe_action__no_action" comment="Preference value for swipe action">Sin acción</string>
|
||||
<string name="pref__gestures__swipe_action__delete_characters_precisely" comment="Preference value for swipe action">Eliminar caracteres con precisión</string>
|
||||
<string name="pref__gestures__swipe_action__delete_word" comment="Preference value for swipe action">Eliminar palabra actual</string>
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
<string name="pref__glide__enabled__summary" comment="Preference summary">Syötä sana liu\'uttamalla sormea sen kirjaimilla</string>
|
||||
<string name="pref__glide__show_trail__label" comment="Preference title">[EVS] Näytä liu\'un jälki</string>
|
||||
<string name="pref__glide__show_trail__summary" comment="Preference summary">Häviää joka sanan jälkeen</string>
|
||||
<string name="pref__gestures__title" comment="Preference group title">Eleet</string>
|
||||
<string name="pref__gestures__general_title" comment="Preference group title">Eleet</string>
|
||||
<string name="pref__gestures__swipe_action__no_action" comment="Preference value for swipe action">Ei toimintoa</string>
|
||||
<string name="pref__gestures__swipe_action__delete_characters_precisely" comment="Preference value for swipe action">Tarkka merkkien poisto</string>
|
||||
<string name="pref__gestures__swipe_action__delete_word" comment="Preference value for swipe action">Poista nykyinen sana</string>
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
<string name="pref__glide__enabled__summary" comment="Preference summary">Tapez un mot en faisant glisser votre doigt entre ses lettres</string>
|
||||
<string name="pref__glide__show_trail__label" comment="Preference title">[NYI] Montrer la piste de glissement</string>
|
||||
<string name="pref__glide__show_trail__summary" comment="Preference summary">Disparaîtra après chaque mot</string>
|
||||
<string name="pref__gestures__title" comment="Preference group title">Gestes</string>
|
||||
<string name="pref__gestures__general_title" comment="Preference group title">Gestes</string>
|
||||
<string name="pref__gestures__swipe_action__no_action" comment="Preference value for swipe action">Aucune action</string>
|
||||
<string name="pref__gestures__swipe_action__delete_characters_precisely" comment="Preference value for swipe action">Effacer les caractères avec précision</string>
|
||||
<string name="pref__gestures__swipe_action__delete_word" comment="Preference value for swipe action">Supprimer le mot courant</string>
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
<string name="pref__glide__enabled__summary" comment="Preference summary">הקלד מילה באמצעות החלקה של האצבע בין האותיות</string>
|
||||
<string name="pref__glide__show_trail__label" comment="Preference title">[NYI] הצד את שביל הגלישה</string>
|
||||
<string name="pref__glide__show_trail__summary" comment="Preference summary">יעלם אחרי כל מילה</string>
|
||||
<string name="pref__gestures__title" comment="Preference group title">מחוות</string>
|
||||
<string name="pref__gestures__general_title" comment="Preference group title">מחוות</string>
|
||||
<string name="pref__gestures__swipe_action__no_action" comment="Preference value for swipe action">ללא פעולה</string>
|
||||
<string name="pref__gestures__swipe_action__delete_characters_precisely" comment="Preference value for swipe action">מחיקת תווים בקפדנות</string>
|
||||
<string name="pref__gestures__swipe_action__delete_word" comment="Preference value for swipe action">מחק מילה נוכחית</string>
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
<string name="pref__glide__enabled__summary" comment="Preference summary">Írjon be egy szót úgy, hogy ujját a betűin keresztülcsúsztatja</string>
|
||||
<string name="pref__glide__show_trail__label" comment="Preference title">[NYI] Nyomvonal megjelenítése</string>
|
||||
<string name="pref__glide__show_trail__summary" comment="Preference summary">Minden szó után eltűnik</string>
|
||||
<string name="pref__gestures__title" comment="Preference group title">Gesztusok</string>
|
||||
<string name="pref__gestures__general_title" comment="Preference group title">Gesztusok</string>
|
||||
<string name="pref__gestures__swipe_action__no_action" comment="Preference value for swipe action">Nincs művelet</string>
|
||||
<string name="pref__gestures__swipe_action__delete_characters_precisely" comment="Preference value for swipe action">Karakterek pontos törlése</string>
|
||||
<string name="pref__gestures__swipe_action__delete_word" comment="Preference value for swipe action">A jelenlegi szó törlése</string>
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
<string name="pref__glide__enabled__summary" comment="Preference summary">Scrivi una parola facendo scivolare il dito sulle lettere che la compongono</string>
|
||||
<string name="pref__glide__show_trail__label" comment="Preference title">[NYI] Mostra scia dello swype</string>
|
||||
<string name="pref__glide__show_trail__summary" comment="Preference summary">Scomparirà dopo ogni parola</string>
|
||||
<string name="pref__gestures__title" comment="Preference group title">Gesti</string>
|
||||
<string name="pref__gestures__general_title" comment="Preference group title">Gesti</string>
|
||||
<string name="pref__gestures__swipe_action__no_action" comment="Preference value for swipe action">Nessuna azione</string>
|
||||
<string name="pref__gestures__swipe_action__delete_characters_precisely" comment="Preference value for swipe action">Cancella lettere con precisione</string>
|
||||
<string name="pref__gestures__swipe_action__delete_word" comment="Preference value for swipe action">Cancella la parola attuale</string>
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
<string name="pref__glide__enabled__summary" comment="Preference summary">نووسین بەسەریەکەوە بەشێوەی دەسخشاندن بەسەر پیتەکاندا</string>
|
||||
<string name="pref__glide__show_trail__label" comment="Preference title">[NYI] پیشاندانی هێڵی نووسین</string>
|
||||
<string name="pref__glide__show_trail__summary" comment="Preference summary">لەدوای هەر ووشەیەک دەردەکەوێ</string>
|
||||
<string name="pref__gestures__title" comment="Preference group title">ئاماژەکان</string>
|
||||
<string name="pref__gestures__general_title" comment="Preference group title">ئاماژەکان</string>
|
||||
<string name="pref__gestures__swipe_action__no_action" comment="Preference value for swipe action">هیچ فرمانێک</string>
|
||||
<string name="pref__gestures__swipe_action__delete_characters_precisely" comment="Preference value for swipe action">سڕینەوەی پیتەکان یەک بە یەک</string>
|
||||
<string name="pref__gestures__swipe_action__delete_word" comment="Preference value for swipe action">سڕینەوەی ووشەی ئێستا</string>
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
<string name="pref__glide__enabled__summary" comment="Preference summary">Typ een woord door je vinger over de letters te vegen</string>
|
||||
<string name="pref__glide__show_trail__label" comment="Preference title">[NYI] Veegspoor tonen</string>
|
||||
<string name="pref__glide__show_trail__summary" comment="Preference summary">Verdwijnt na elk woord</string>
|
||||
<string name="pref__gestures__title" comment="Preference group title">Gebaren</string>
|
||||
<string name="pref__gestures__general_title" comment="Preference group title">Gebaren</string>
|
||||
<string name="pref__gestures__swipe_action__no_action" comment="Preference value for swipe action">Geen actie</string>
|
||||
<string name="pref__gestures__swipe_action__delete_characters_precisely" comment="Preference value for swipe action">Tekens nauwkeurig verwijderen</string>
|
||||
<string name="pref__gestures__swipe_action__delete_word" comment="Preference value for swipe action">Huidige woord verwijderen</string>
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
<string name="pref__glide__enabled__summary" comment="Preference summary">Digitar uma palavra deslizando o dedo através de suas letras</string>
|
||||
<string name="pref__glide__show_trail__label" comment="Preference title">[NYI] Mostrar trilha de deslizamento</string>
|
||||
<string name="pref__glide__show_trail__summary" comment="Preference summary">Desaparecerá após cada palavra</string>
|
||||
<string name="pref__gestures__title" comment="Preference group title">Gestos</string>
|
||||
<string name="pref__gestures__general_title" comment="Preference group title">Gestos</string>
|
||||
<string name="pref__gestures__swipe_action__no_action" comment="Preference value for swipe action">Nenhuma ação</string>
|
||||
<string name="pref__gestures__swipe_action__delete_characters_precisely" comment="Preference value for swipe action">Excluir caracteres com precisão</string>
|
||||
<string name="pref__gestures__swipe_action__delete_word" comment="Preference value for swipe action">Excluir palavra atual</string>
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
<string name="pref__glide__enabled__summary" comment="Preference summary">Digitar uma palavra deslizando o dedo através das teclas</string>
|
||||
<string name="pref__glide__show_trail__label" comment="Preference title">[NYI] Mostrar rasto de escrita</string>
|
||||
<string name="pref__glide__show_trail__summary" comment="Preference summary">O rasto desparece no final da palavra</string>
|
||||
<string name="pref__gestures__title" comment="Preference group title">Gestos</string>
|
||||
<string name="pref__gestures__general_title" comment="Preference group title">Gestos</string>
|
||||
<string name="pref__gestures__swipe_action__no_action" comment="Preference value for swipe action">Sem ação</string>
|
||||
<string name="pref__gestures__swipe_action__delete_characters_precisely" comment="Preference value for swipe action">Remover caracteres com precisão</string>
|
||||
<string name="pref__gestures__swipe_action__delete_word" comment="Preference value for swipe action">Remover palavra atual</string>
|
||||
|
||||
@@ -58,24 +58,34 @@
|
||||
|
||||
<string-array name="pref__gestures__swipe_action__entries">
|
||||
<item>@string/pref__gestures__swipe_action__no_action</item>
|
||||
<item>@string/pref__gestures__swipe_action__delete_word</item>
|
||||
<item>@string/pref__gestures__swipe_action__hide_keyboard</item>
|
||||
<item>@string/pref__gestures__swipe_action__insert_space</item>
|
||||
<item>@string/pref__gestures__swipe_action__move_cursor_up</item>
|
||||
<item>@string/pref__gestures__swipe_action__move_cursor_down</item>
|
||||
<item>@string/pref__gestures__swipe_action__move_cursor_left</item>
|
||||
<item>@string/pref__gestures__swipe_action__move_cursor_right</item>
|
||||
<item>@string/pref__gestures__swipe_action__move_cursor_start_of_line</item>
|
||||
<item>@string/pref__gestures__swipe_action__move_cursor_end_of_line</item>
|
||||
<item>@string/pref__gestures__swipe_action__shift</item>
|
||||
<item>@string/pref__gestures__swipe_action__show_input_method_picker</item>
|
||||
<item>@string/pref__gestures__swipe_action__switch_to_prev_subtype</item>
|
||||
<item>@string/pref__gestures__swipe_action__switch_to_next_subtype</item>
|
||||
<item>@string/pref__gestures__swipe_action__switch_to_prev_keyboard</item>
|
||||
</string-array>
|
||||
<string-array name="pref__gestures__swipe_action__values">
|
||||
<item>no_action</item>
|
||||
<item>delete_word</item>
|
||||
<item>hide_keyboard</item>
|
||||
<item>insert_space</item>
|
||||
<item>move_cursor_up</item>
|
||||
<item>move_cursor_down</item>
|
||||
<item>move_cursor_left</item>
|
||||
<item>move_cursor_right</item>
|
||||
<item>move_cursor_start_of_line</item>
|
||||
<item>move_cursor_end_of_line</item>
|
||||
<item>shift</item>
|
||||
<item>show_input_method_picker</item>
|
||||
<item>switch_to_prev_subtype</item>
|
||||
<item>switch_to_next_subtype</item>
|
||||
<item>switch_to_prev_keyboard</item>
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
<string name="settings__theme_editor__value_type_other_text" comment="Theme value type sub-field">Text</string>
|
||||
<string name="settings__theme_editor__value_preview_content_description" comment="Theme value preview content description">Preview of the theme value</string>
|
||||
<string name="settings__theme_editor__error_theme_label_empty" comment="Error text for an empty theme label">Please enter a theme name.</string>
|
||||
<string name="settings__theme_editor__error_group_name" comment="Error text for an invalid group name">Please enter a group name which only contain the letters a-z and/or A-Z.</string>
|
||||
<string name="settings__theme_editor__error_group_name" comment="Error text for an invalid group name">Please enter a group name which only contain letters (a-z and/or A-Z) or colons (:) for sub-grouping.</string>
|
||||
<string name="settings__theme_editor__error_group_name_empty" comment="Error text for an empty group name">Please enter a group name.</string>
|
||||
<string name="settings__theme_editor__error_attr_name" comment="Error text for an invalid attribute name">Please enter an attribute name which only contain the letters a-z and/or A-Z.</string>
|
||||
<string name="settings__theme_editor__error_attr_name_empty" comment="Error text for an empty attribute name">Please enter an attribute name.</string>
|
||||
@@ -214,17 +214,23 @@
|
||||
<string name="pref__glide__enabled__summary" comment="Preference summary">Type in a word by sliding your finger through its letters</string>
|
||||
<string name="pref__glide__show_trail__label" comment="Preference title">[NYI] Show glide trail</string>
|
||||
<string name="pref__glide__show_trail__summary" comment="Preference summary">Will disappear after each word</string>
|
||||
<string name="pref__gestures__title" comment="Preference group title">Gestures</string>
|
||||
<string name="pref__gestures__general_title" comment="Preference group title">General gestures</string>
|
||||
<string name="pref__gestures__space_bar_title" comment="Preference group title">Space bar gestures</string>
|
||||
<string name="pref__gestures__other_title" comment="Preference group title">Other gestures / Gesture thresholds</string>
|
||||
<string name="pref__gestures__swipe_action__no_action" comment="Preference value for swipe action">No action</string>
|
||||
<string name="pref__gestures__swipe_action__delete_characters_precisely" comment="Preference value for swipe action">Delete characters precisely</string>
|
||||
<string name="pref__gestures__swipe_action__delete_word" comment="Preference value for swipe action">Delete current word</string>
|
||||
<string name="pref__gestures__swipe_action__delete_words_precisely" comment="Preference value for swipe action">Delete words precisely</string>
|
||||
<string name="pref__gestures__swipe_action__hide_keyboard" comment="Preference value for swipe action">Hide keyboard</string>
|
||||
<string name="pref__gestures__swipe_action__insert_space" comment="Preference value for swipe action">Insert space</string>
|
||||
<string name="pref__gestures__swipe_action__move_cursor_up" comment="Preference value for swipe action">Move cursor up</string>
|
||||
<string name="pref__gestures__swipe_action__move_cursor_down" comment="Preference value for swipe action">Move cursor down</string>
|
||||
<string name="pref__gestures__swipe_action__move_cursor_left" comment="Preference value for swipe action">Move cursor left</string>
|
||||
<string name="pref__gestures__swipe_action__move_cursor_right" comment="Preference value for swipe action">Move cursor right</string>
|
||||
<string name="pref__gestures__swipe_action__move_cursor_start_of_line" comment="Preference value for swipe action">Move cursor to start of line</string>
|
||||
<string name="pref__gestures__swipe_action__move_cursor_end_of_line" comment="Preference value for swipe action">Move cursor to end of line</string>
|
||||
<string name="pref__gestures__swipe_action__shift" comment="Preference value for swipe action">Shift</string>
|
||||
<string name="pref__gestures__swipe_action__show_input_method_picker" comment="Preference value for swipe action">Show input method picker</string>
|
||||
<string name="pref__gestures__swipe_action__switch_to_prev_keyboard" comment="Preference value for swipe action">Switch to previous keyboard</string>
|
||||
<string name="pref__gestures__swipe_action__switch_to_prev_subtype" comment="Preference value for swipe action">Switch to previous subtype</string>
|
||||
<string name="pref__gestures__swipe_action__switch_to_next_subtype" comment="Preference value for swipe action">Switch to next subtype</string>
|
||||
@@ -235,6 +241,7 @@
|
||||
<string name="pref__gestures__space_bar_swipe_up__label" comment="Preference title">Space bar swipe up</string>
|
||||
<string name="pref__gestures__space_bar_swipe_left__label" comment="Preference title">Space bar swipe left</string>
|
||||
<string name="pref__gestures__space_bar_swipe_right__label" comment="Preference title">Space bar swipe right</string>
|
||||
<string name="pref__gestures__space_bar_long_press__label" comment="Preference title">Space bar long press</string>
|
||||
<string name="pref__gestures__delete_key_swipe_left__label" comment="Preference title">Delete key swipe left</string>
|
||||
<string name="pref__gestures__swipe_velocity_threshold__label" comment="Preference title">Swipe velocity threshold</string>
|
||||
<string name="pref__gestures__swipe_velocity_threshold__very_slow" comment="Preference value for swipe velocity threshold">Very slow</string>
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
|
||||
<PreferenceCategory
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="gestures"
|
||||
app:title="@string/pref__gestures__title">
|
||||
app:key="general_gestures"
|
||||
app:title="@string/pref__gestures__general_title">
|
||||
|
||||
<ListPreference
|
||||
app:iconSpaceReserved="false"
|
||||
@@ -69,6 +69,13 @@
|
||||
app:title="@string/pref__gestures__swipe_right__label"
|
||||
app:useSimpleSummaryProvider="true"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="space_bar_gestures"
|
||||
app:title="@string/pref__gestures__space_bar_title">
|
||||
|
||||
<ListPreference
|
||||
app:iconSpaceReserved="false"
|
||||
android:defaultValue="switch_to_prev_keyboard"
|
||||
@@ -96,6 +103,22 @@
|
||||
app:title="@string/pref__gestures__space_bar_swipe_right__label"
|
||||
app:useSimpleSummaryProvider="true"/>
|
||||
|
||||
<ListPreference
|
||||
app:iconSpaceReserved="false"
|
||||
android:defaultValue="show_input_method_picker"
|
||||
app:entries="@array/pref__gestures__swipe_action__entries"
|
||||
app:entryValues="@array/pref__gestures__swipe_action__values"
|
||||
app:key="gestures__space_bar_long_press"
|
||||
app:title="@string/pref__gestures__space_bar_long_press__label"
|
||||
app:useSimpleSummaryProvider="true"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="other_gestures"
|
||||
app:title="@string/pref__gestures__other_title">
|
||||
|
||||
<ListPreference
|
||||
app:iconSpaceReserved="false"
|
||||
android:defaultValue="delete_characters_precisely"
|
||||
|
||||
9
fastlane/metadata/android/en-US/changelogs/23.txt
Normal file
9
fastlane/metadata/android/en-US/changelogs/23.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
- Add new swipe actions / Improve gesture pref structure (#212)
|
||||
- Add Bépo french keyboard layout (#202) (thanks @Salamandar)
|
||||
- Add Portuguese (Brazil) specific extended popups (#187) (thanks @RickyM7)
|
||||
- Fix precise character deletion behaviour (#218)
|
||||
- Fix double key press bugs for space and shift (#170)
|
||||
- Fix key hint bug (#211)
|
||||
- Extended popups now respect country code (#188)
|
||||
- Fix group name input not accepting colons
|
||||
- Fix delete and shift key width for 9+ char rows
|
||||
Reference in New Issue
Block a user