mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-14 14:02:44 +00:00
move content of layoutInfos to more suitable places
and add plans for moving it around some more
This commit is contained in:
parent
2466187eb3
commit
b76dc8ced5
6 changed files with 82 additions and 88 deletions
|
@ -51,14 +51,7 @@ open class KeyboardBuilder<KP : KeyboardParams>(protected val mContext: Context,
|
||||||
keysInRows = EmojiParser(mParams, mContext).parse()
|
keysInRows = EmojiParser(mParams, mContext).parse()
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
val sv = Settings.getInstance().current
|
setupParams()
|
||||||
// previously was false for nordic and serbian_qwertz, true for all others
|
|
||||||
// todo: add setting? maybe users want it in a custom layout
|
|
||||||
mParams.mAllowRedundantPopupKeys = mParams.mId.mElementId != KeyboardId.ELEMENT_SYMBOLS
|
|
||||||
addLocaleKeyTextsToParams(mContext, mParams, sv.mShowMorePopupKeys)
|
|
||||||
mParams.mPopupKeyTypes.addAll(sv.mPopupKeyTypes)
|
|
||||||
// add label source only if popup key type enabled
|
|
||||||
sv.mPopupKeyLabelSources.forEach { if (it in sv.mPopupKeyTypes) mParams.mPopupKeyLabelSources.add(it) }
|
|
||||||
keysInRows = KeyboardParser(mParams, mContext).parseLayout()
|
keysInRows = KeyboardParser(mParams, mContext).parseLayout()
|
||||||
determineAbsoluteValues()
|
determineAbsoluteValues()
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
@ -69,6 +62,27 @@ open class KeyboardBuilder<KP : KeyboardParams>(protected val mContext: Context,
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun setupParams() {
|
||||||
|
val sv = Settings.getInstance().current
|
||||||
|
val layoutName = mParams.mId.mSubtype.keyboardLayoutSetName
|
||||||
|
|
||||||
|
// previously was false for nordic and serbian_qwertz, true for all others
|
||||||
|
// todo: add setting? maybe users want it in a custom layout
|
||||||
|
mParams.mAllowRedundantPopupKeys = mParams.mId.mElementId != KeyboardId.ELEMENT_SYMBOLS
|
||||||
|
|
||||||
|
// todo: should this be in subtype extra values?
|
||||||
|
mParams.mProximityCharsCorrectionEnabled = mParams.mId.isAlphabetKeyboard && when (layoutName) {
|
||||||
|
"bengali_akkhor", "georgian", "hindi", "lao", "nepali_romanized", "nepali_traditional", "sinhala", "thai" ->
|
||||||
|
mParams.mId.mElementId == KeyboardId.ELEMENT_ALPHABET // not for shifted layouts
|
||||||
|
else -> true
|
||||||
|
}
|
||||||
|
|
||||||
|
addLocaleKeyTextsToParams(mContext, mParams, sv.mShowMorePopupKeys)
|
||||||
|
mParams.mPopupKeyTypes.addAll(sv.mPopupKeyTypes)
|
||||||
|
// add label source only if popup key type enabled
|
||||||
|
sv.mPopupKeyLabelSources.forEach { if (it in sv.mPopupKeyTypes) mParams.mPopupKeyLabelSources.add(it) }
|
||||||
|
}
|
||||||
|
|
||||||
// todo: remnant of old parser, replace it if reasonably simple
|
// todo: remnant of old parser, replace it if reasonably simple
|
||||||
protected fun readAttributes(@XmlRes xmlId: Int) {
|
protected fun readAttributes(@XmlRes xmlId: Int) {
|
||||||
val parser = mResources.getXml(xmlId)
|
val parser = mResources.getXml(xmlId)
|
||||||
|
|
|
@ -20,6 +20,7 @@ import helium314.keyboard.keyboard.internal.keyboard_parser.LocaleKeyboardInfos;
|
||||||
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyCode;
|
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyCode;
|
||||||
import helium314.keyboard.latin.R;
|
import helium314.keyboard.latin.R;
|
||||||
import helium314.keyboard.latin.settings.Settings;
|
import helium314.keyboard.latin.settings.Settings;
|
||||||
|
import helium314.keyboard.latin.utils.Log;
|
||||||
import helium314.keyboard.latin.utils.ResourceUtils;
|
import helium314.keyboard.latin.utils.ResourceUtils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -93,6 +94,7 @@ public class KeyboardParams {
|
||||||
public int mMostCommonKeyHeight = 0;
|
public int mMostCommonKeyHeight = 0;
|
||||||
public int mMostCommonKeyWidth = 0;
|
public int mMostCommonKeyWidth = 0;
|
||||||
|
|
||||||
|
// should be enabled for all alphabet layouts, except for specific layouts when shifted
|
||||||
public boolean mProximityCharsCorrectionEnabled;
|
public boolean mProximityCharsCorrectionEnabled;
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
|
@ -267,11 +269,29 @@ public class KeyboardParams {
|
||||||
mThemeId = keyboardAttr.getInt(R.styleable.Keyboard_themeId, 0);
|
mThemeId = keyboardAttr.getInt(R.styleable.Keyboard_themeId, 0);
|
||||||
mIconsSet.loadIcons(keyboardAttr);
|
mIconsSet.loadIcons(keyboardAttr);
|
||||||
|
|
||||||
final int resourceId = keyboardAttr.getResourceId(R.styleable.Keyboard_touchPositionCorrectionData, 0);
|
// todo: this clashes with the other way of doing it... now both moved here, in same order
|
||||||
if (resourceId != 0) {
|
// need to check OpenBoard how it was done there
|
||||||
final String[] data = context.getResources().getStringArray(resourceId);
|
// also, popup keys should have an empty array
|
||||||
|
final int touchPositionResId = keyboardAttr.getResourceId(R.styleable.Keyboard_touchPositionCorrectionData, 0);
|
||||||
|
if (touchPositionResId != 0) {
|
||||||
|
final String[] data = context.getResources().getStringArray(touchPositionResId);
|
||||||
mTouchPositionCorrection.load(data);
|
mTouchPositionCorrection.load(data);
|
||||||
}
|
}
|
||||||
|
// so this is the new way:
|
||||||
|
final int touchPositionResIdNew;
|
||||||
|
if (mId.isAlphabetKeyboard()) {
|
||||||
|
touchPositionResIdNew = switch (mId.mSubtype.getKeyboardLayoutSetName()) {
|
||||||
|
case "armenian_phonetic", "khmer", "lao", "malayalam", "pcqwerty", "thai" -> R.array.touch_position_correction_data_default;
|
||||||
|
default -> R.array.touch_position_correction_data_holo;
|
||||||
|
};
|
||||||
|
} else touchPositionResIdNew = R.array.touch_position_correction_data_holo;
|
||||||
|
if (touchPositionResIdNew != touchPositionResId) {
|
||||||
|
Log.i("KeyboardParams", "overriding touchPositionCorrection "+touchPositionResId+" with "+touchPositionResIdNew);
|
||||||
|
if (touchPositionResIdNew != 0) {
|
||||||
|
final String[] data = context.getResources().getStringArray(touchPositionResIdNew);
|
||||||
|
mTouchPositionCorrection.load(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
keyAttr.recycle();
|
keyAttr.recycle();
|
||||||
keyboardAttr.recycle();
|
keyboardAttr.recycle();
|
||||||
|
|
|
@ -13,7 +13,6 @@ import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyLabel
|
||||||
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyType
|
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyType
|
||||||
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.SimplePopups
|
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.SimplePopups
|
||||||
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.TextKeyData
|
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.TextKeyData
|
||||||
import helium314.keyboard.latin.R
|
|
||||||
import helium314.keyboard.latin.common.isEmoji
|
import helium314.keyboard.latin.common.isEmoji
|
||||||
import helium314.keyboard.latin.define.DebugFlags
|
import helium314.keyboard.latin.define.DebugFlags
|
||||||
import helium314.keyboard.latin.settings.Settings
|
import helium314.keyboard.latin.settings.Settings
|
||||||
|
@ -36,7 +35,6 @@ import helium314.keyboard.latin.utils.sumOf
|
||||||
* requirements of certain non-latin languages.
|
* requirements of certain non-latin languages.
|
||||||
*/
|
*/
|
||||||
class KeyboardParser(private val params: KeyboardParams, private val context: Context) {
|
class KeyboardParser(private val params: KeyboardParams, private val context: Context) {
|
||||||
private val infos = layoutInfos(params)
|
|
||||||
private val defaultLabelFlags = when {
|
private val defaultLabelFlags = when {
|
||||||
params.mId.isAlphabetKeyboard -> params.mLocaleKeyboardInfos.labelFlags
|
params.mId.isAlphabetKeyboard -> params.mLocaleKeyboardInfos.labelFlags
|
||||||
// reproduce the no-hints in symbol layouts
|
// reproduce the no-hints in symbol layouts
|
||||||
|
@ -47,11 +45,6 @@ class KeyboardParser(private val params: KeyboardParams, private val context: Co
|
||||||
|
|
||||||
fun parseLayout(): ArrayList<ArrayList<KeyParams>> {
|
fun parseLayout(): ArrayList<ArrayList<KeyParams>> {
|
||||||
params.readAttributes(context, null)
|
params.readAttributes(context, null)
|
||||||
params.mProximityCharsCorrectionEnabled = infos.enableProximityCharsCorrection
|
|
||||||
if (infos.touchPositionCorrectionData == null) // need to set correctly, as it's not properly done in readAttributes with attr = null
|
|
||||||
params.mTouchPositionCorrection.load(emptyArray())
|
|
||||||
else
|
|
||||||
params.mTouchPositionCorrection.load(context.resources.getStringArray(infos.touchPositionCorrectionData))
|
|
||||||
|
|
||||||
val baseKeys = RawKeyboardParser.parseLayout(params, context)
|
val baseKeys = RawKeyboardParser.parseLayout(params, context)
|
||||||
val keysInRows = createRows(baseKeys)
|
val keysInRows = createRows(baseKeys)
|
||||||
|
@ -272,7 +265,6 @@ class KeyboardParser(private val params: KeyboardParams, private val context: Co
|
||||||
private fun KeyData.processFunctionalKeys(): KeyData? = when (label) {
|
private fun KeyData.processFunctionalKeys(): KeyData? = when (label) {
|
||||||
// todo: why defaultLabelFlags exactly here? is this for armenian or bengali period labels? try removing also check in holo theme
|
// todo: why defaultLabelFlags exactly here? is this for armenian or bengali period labels? try removing also check in holo theme
|
||||||
KeyLabel.PERIOD -> copy(newLabelFlags = labelFlags or defaultLabelFlags)
|
KeyLabel.PERIOD -> copy(newLabelFlags = labelFlags or defaultLabelFlags)
|
||||||
KeyLabel.SHIFT -> if (infos.hasShiftKey) this else null
|
|
||||||
else -> this
|
else -> this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,7 +274,7 @@ class KeyboardParser(private val params: KeyboardParams, private val context: Co
|
||||||
val numberRow = params.mLocaleKeyboardInfos.getNumberRow()
|
val numberRow = params.mLocaleKeyboardInfos.getNumberRow()
|
||||||
numberRow.forEachIndexed { index, keyData -> keyData.popup.symbol = baseKeys[0].getOrNull(index)?.label }
|
numberRow.forEachIndexed { index, keyData -> keyData.popup.symbol = baseKeys[0].getOrNull(index)?.label }
|
||||||
baseKeys[0] = numberRow.toMutableList()
|
baseKeys[0] = numberRow.toMutableList()
|
||||||
} else if (!params.mId.mNumberRowEnabled && params.mId.isAlphabetKeyboard && infos.numbersOnTopRow) {
|
} else if (!params.mId.mNumberRowEnabled && params.mId.isAlphabetKeyboard && hasNumbersOnTopRow()) {
|
||||||
if (baseKeys[0].any { it.popup.main != null || !it.popup.relevant.isNullOrEmpty() } // first row of baseKeys has any layout popup key
|
if (baseKeys[0].any { it.popup.main != null || !it.popup.relevant.isNullOrEmpty() } // first row of baseKeys has any layout popup key
|
||||||
&& params.mPopupKeyLabelSources.let {
|
&& params.mPopupKeyLabelSources.let {
|
||||||
val layout = it.indexOf(POPUP_KEYS_LAYOUT)
|
val layout = it.indexOf(POPUP_KEYS_LAYOUT)
|
||||||
|
@ -312,76 +304,16 @@ class KeyboardParser(private val params: KeyboardParams, private val context: Co
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// some layouts have different number layout, and there we don't want the numbers on the top row
|
||||||
|
// todo: actually should not be in here, but in subtype extra values
|
||||||
|
private fun hasNumbersOnTopRow() = params.mId.mSubtype.keyboardLayoutSetName !in listOf("pcqwerty", "lao", "thai", "korean_sebeolsik_390", "korean_sebeolsik_final")
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val TAG = "KeyboardParser"
|
private const val TAG = "KeyboardParser"
|
||||||
|
|
||||||
// todo:
|
|
||||||
// layoutInfos should be stored in method.xml (imeSubtypeExtraValue)
|
|
||||||
// or somewhere else... some replacement for keyboard_layout_set xml maybe
|
|
||||||
// some assets file?
|
|
||||||
// some extended version of locale_key_texts? that would be good, just need to rename the class and file
|
|
||||||
// touchPositionCorrectionData is just the resId, needs to be loaded in parser
|
|
||||||
// currently always holo is applied in readAttributes
|
|
||||||
private fun layoutInfos(params: KeyboardParams): LayoutInfos {
|
|
||||||
val layout = params.mId.mSubtype.keyboardLayoutSetName
|
|
||||||
// only for alphabet, but some exceptions for shift layouts
|
|
||||||
val enableProximityCharsCorrection = params.mId.isAlphabetKeyboard && when (layout) {
|
|
||||||
"bengali_akkhor", "georgian", "hindi", "lao", "nepali_romanized", "nepali_traditional", "sinhala", "thai" ->
|
|
||||||
params.mId.mElementId == KeyboardId.ELEMENT_ALPHABET
|
|
||||||
else -> true
|
|
||||||
}
|
|
||||||
// essentially this is default for 4 row and non-alphabet layouts, maybe this could be determined automatically instead of using a list
|
|
||||||
// todo: check the difference between default (i.e. none) and holo (test behavior on keyboard)
|
|
||||||
val touchPositionCorrectionData = if (params.mId.isAlphabetKeyboard && layout in listOf("armenian_phonetic", "khmer", "lao", "malayalam", "pcqwerty", "thai"))
|
|
||||||
R.array.touch_position_correction_data_default
|
|
||||||
else R.array.touch_position_correction_data_holo
|
|
||||||
// custom non-json layout for non-uppercase language should not have shift key
|
|
||||||
val hasShiftKey = !params.mId.isAlphabetKeyboard
|
|
||||||
|| layout !in listOf("hindi_compact", "bengali", "arabic", "arabic_pc", "hebrew", "kannada", "kannada_extended","malayalam", "marathi", "farsi", "tamil", "telugu")
|
|
||||||
val numbersOnTopRow = layout !in listOf("pcqwerty", "lao", "thai", "korean_sebeolsik_390", "korean_sebeolsik_final")
|
|
||||||
return LayoutInfos(enableProximityCharsCorrection, touchPositionCorrectionData, hasShiftKey, numbersOnTopRow)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: actually this should be in some separate file
|
|
||||||
data class LayoutInfos(
|
|
||||||
// disabled by default, but enabled for all alphabet layouts
|
|
||||||
// currently set in keyboardLayoutSet
|
|
||||||
val enableProximityCharsCorrection: Boolean = false,
|
|
||||||
// there is holo, default and null
|
|
||||||
// null only for popupKeys keyboard
|
|
||||||
val touchPositionCorrectionData: Int? = null,
|
|
||||||
// some layouts do not have a shift key
|
|
||||||
val hasShiftKey: Boolean = true,
|
|
||||||
// some layouts have different number layout, e.g. thai or korean_sebeolsik
|
|
||||||
val numbersOnTopRow: Boolean = true,
|
|
||||||
)
|
|
||||||
|
|
||||||
fun String.rtlLabel(params: KeyboardParams): String {
|
|
||||||
if (!params.mId.mSubtype.isRtlSubtype || params.mId.isNumberLayout) return this
|
|
||||||
return when (this) {
|
|
||||||
"{" -> "{|}"
|
|
||||||
"}" -> "}|{"
|
|
||||||
"(" -> "(|)"
|
|
||||||
")" -> ")|("
|
|
||||||
"[" -> "[|]"
|
|
||||||
"]" -> "]|["
|
|
||||||
"<" -> "<|>"
|
|
||||||
">" -> ">|<"
|
|
||||||
"≤" -> "≤|≥"
|
|
||||||
"≥" -> "≥|≤"
|
|
||||||
"«" -> "«|»"
|
|
||||||
"»" -> "»|«"
|
|
||||||
"‹" -> "‹|›"
|
|
||||||
"›" -> "›|‹"
|
|
||||||
"﴾" -> "﴾|﴿"
|
|
||||||
"﴿" -> "﴿|﴾"
|
|
||||||
else -> this
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const val LAYOUT_SYMBOLS = "symbols"
|
const val LAYOUT_SYMBOLS = "symbols"
|
||||||
const val LAYOUT_SYMBOLS_SHIFTED = "symbols_shifted"
|
const val LAYOUT_SYMBOLS_SHIFTED = "symbols_shifted"
|
||||||
const val LAYOUT_SYMBOLS_ARABIC = "symbols_arabic"
|
const val LAYOUT_SYMBOLS_ARABIC = "symbols_arabic"
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package helium314.keyboard.keyboard.internal.keyboard_parser.floris
|
package helium314.keyboard.keyboard.internal.keyboard_parser.floris
|
||||||
|
|
||||||
|
import helium314.keyboard.keyboard.internal.KeyboardParams
|
||||||
|
|
||||||
/** labels for functional / special keys */
|
/** labels for functional / special keys */
|
||||||
object KeyLabel {
|
object KeyLabel {
|
||||||
const val EMOJI = "emoji"
|
const val EMOJI = "emoji"
|
||||||
|
@ -45,4 +47,27 @@ object KeyLabel {
|
||||||
else -> this
|
else -> this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun String.rtlLabel(params: KeyboardParams): String {
|
||||||
|
if (!params.mId.mSubtype.isRtlSubtype || params.mId.isNumberLayout) return this
|
||||||
|
return when (this) {
|
||||||
|
"{" -> "{|}"
|
||||||
|
"}" -> "}|{"
|
||||||
|
"(" -> "(|)"
|
||||||
|
")" -> ")|("
|
||||||
|
"[" -> "[|]"
|
||||||
|
"]" -> "]|["
|
||||||
|
"<" -> "<|>"
|
||||||
|
">" -> ">|<"
|
||||||
|
"≤" -> "≤|≥"
|
||||||
|
"≥" -> "≥|≤"
|
||||||
|
"«" -> "«|»"
|
||||||
|
"»" -> "»|«"
|
||||||
|
"‹" -> "‹|›"
|
||||||
|
"›" -> "›|‹"
|
||||||
|
"﴾" -> "﴾|﴿"
|
||||||
|
"﴿" -> "﴿|﴾"
|
||||||
|
else -> this
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ import helium314.keyboard.keyboard.internal.KeyboardIconsSet
|
||||||
import helium314.keyboard.keyboard.internal.KeyboardParams
|
import helium314.keyboard.keyboard.internal.KeyboardParams
|
||||||
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyCode.checkAndConvertCode
|
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyCode.checkAndConvertCode
|
||||||
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyLabel.convertFlorisLabel
|
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyLabel.convertFlorisLabel
|
||||||
import helium314.keyboard.keyboard.internal.keyboard_parser.rtlLabel
|
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyLabel.rtlLabel
|
||||||
import helium314.keyboard.latin.common.Constants
|
import helium314.keyboard.latin.common.Constants
|
||||||
import helium314.keyboard.latin.common.LocaleUtils.constructLocale
|
import helium314.keyboard.latin.common.LocaleUtils.constructLocale
|
||||||
import helium314.keyboard.latin.common.StringUtils
|
import helium314.keyboard.latin.common.StringUtils
|
||||||
|
@ -284,12 +284,15 @@ sealed interface KeyData : AbstractKeyData {
|
||||||
private const val POPUP_EYS_NAVIGATE_EMOJI_PREVIOUS_NEXT = "!fixedColumnOrder!4,!needsDividers!,!icon/previous_key|!code/key_action_previous,!icon/clipboard_action_key|!code/key_clipboard,!icon/emoji_action_key|!code/key_emoji,!icon/next_key|!code/key_action_next"
|
private const val POPUP_EYS_NAVIGATE_EMOJI_PREVIOUS_NEXT = "!fixedColumnOrder!4,!needsDividers!,!icon/previous_key|!code/key_action_previous,!icon/clipboard_action_key|!code/key_clipboard,!icon/emoji_action_key|!code/key_emoji,!icon/next_key|!code/key_action_next"
|
||||||
}
|
}
|
||||||
|
|
||||||
// make it non-nullable for simplicity, and to reflect current implementations
|
override fun compute(params: KeyboardParams): KeyData? {
|
||||||
override fun compute(params: KeyboardParams): KeyData {
|
|
||||||
require(groupId <= GROUP_ENTER) { "only groups up to GROUP_ENTER are supported" }
|
require(groupId <= GROUP_ENTER) { "only groups up to GROUP_ENTER are supported" }
|
||||||
require(label.isNotEmpty() || type == KeyType.PLACEHOLDER || code != KeyCode.UNSPECIFIED) { "non-placeholder key has no code and no label" }
|
require(label.isNotEmpty() || type == KeyType.PLACEHOLDER || code != KeyCode.UNSPECIFIED) { "non-placeholder key has no code and no label" }
|
||||||
require(width >= 0f || width == -1f) { "illegal width $width" }
|
require(width >= 0f || width == -1f) { "illegal width $width" }
|
||||||
val newLabel = label.convertFlorisLabel().resolveStringLabel(params)
|
val newLabel = label.convertFlorisLabel().resolveStringLabel(params)
|
||||||
|
if (newLabel == KeyLabel.SHIFT && params.mId.isAlphabetKeyboard
|
||||||
|
&& params.mId.mSubtype.keyboardLayoutSetName in listOf("hindi_compact", "bengali", "arabic", "arabic_pc", "hebrew", "kannada", "kannada_extended","malayalam", "marathi", "farsi", "tamil", "telugu")) {
|
||||||
|
return null // these layouts have no shift key, todo: should be in subtype extras
|
||||||
|
}
|
||||||
val newCode = code.checkAndConvertCode()
|
val newCode = code.checkAndConvertCode()
|
||||||
val newLabelFlags = if (labelFlags == 0 && params.mId.isNumberLayout) {
|
val newLabelFlags = if (labelFlags == 0 && params.mId.isNumberLayout) {
|
||||||
if (type == KeyType.NUMERIC) {
|
if (type == KeyType.NUMERIC) {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import android.content.SharedPreferences
|
||||||
import helium314.keyboard.keyboard.Key
|
import helium314.keyboard.keyboard.Key
|
||||||
import helium314.keyboard.keyboard.internal.KeySpecParser
|
import helium314.keyboard.keyboard.internal.KeySpecParser
|
||||||
import helium314.keyboard.keyboard.internal.KeyboardParams
|
import helium314.keyboard.keyboard.internal.KeyboardParams
|
||||||
|
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyLabel.rtlLabel
|
||||||
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.PopupSet
|
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.PopupSet
|
||||||
import helium314.keyboard.keyboard.internal.keyboard_parser.rtlLabel
|
|
||||||
|
|
||||||
const val POPUP_KEYS_NUMBER = "popup_keys_number"
|
const val POPUP_KEYS_NUMBER = "popup_keys_number"
|
||||||
private const val POPUP_KEYS_LANGUAGE_PRIORITY = "popup_keys_language_priority"
|
private const val POPUP_KEYS_LANGUAGE_PRIORITY = "popup_keys_language_priority"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue