mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-14 14:02:44 +00:00
add / to symbols layout and adjust functional key layouts for symbols layouts
i remember this was requested, can't find the issue though anyway, now with fully customizable layouts this is not blocked by "people might be used to this" any more
This commit is contained in:
parent
0459971e3a
commit
bd7461f628
10 changed files with 15 additions and 28 deletions
|
@ -21,7 +21,7 @@
|
|||
{ "label": "j" },
|
||||
{ "label": "k" },
|
||||
{ "label": "l" },
|
||||
{ "label": "m", "popup": { "main": { "label": "/" } } }
|
||||
{ "label": "m" }
|
||||
],
|
||||
[
|
||||
{ "label": "w" },
|
||||
|
|
|
@ -18,7 +18,7 @@ t
|
|||
s
|
||||
r
|
||||
n
|
||||
m /
|
||||
m
|
||||
|
||||
y
|
||||
x
|
||||
|
|
|
@ -18,7 +18,7 @@ t
|
|||
a
|
||||
e
|
||||
o
|
||||
i /
|
||||
i
|
||||
|
||||
m
|
||||
v
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
{ "label": "j" },
|
||||
{ "label": "k" },
|
||||
{ "label": "l" },
|
||||
{ "label": "m", "popup": { "main": { "label": "/" } } }
|
||||
{ "label": "m" }
|
||||
],
|
||||
[
|
||||
{ "label": "w" },
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
о
|
||||
л
|
||||
д
|
||||
ж /
|
||||
ж
|
||||
ъ ~
|
||||
|
||||
я
|
||||
|
|
|
@ -18,6 +18,7 @@ _ % ‰
|
|||
+ ±
|
||||
( < { [
|
||||
) > } ]
|
||||
/
|
||||
|
||||
* † ‡ ★
|
||||
"
|
||||
|
|
|
@ -26,3 +26,6 @@ $$$4
|
|||
% ℅
|
||||
[
|
||||
]
|
||||
|
||||
< !fixedColumnOrder!3 ‹ ≤ «
|
||||
> !fixedColumnOrder!3 › ≥ »
|
||||
|
|
|
@ -18,7 +18,7 @@ y
|
|||
n
|
||||
e
|
||||
o
|
||||
i /
|
||||
i
|
||||
|
||||
z
|
||||
x
|
||||
|
|
|
@ -218,31 +218,11 @@ class KeyboardParser(private val params: KeyboardParams, private val context: Co
|
|||
)
|
||||
baseKeys.removeLast()
|
||||
}
|
||||
// add those extra keys depending on layout (remove later)
|
||||
val spaceIndex = functionalKeysBottom.indexOfFirst { it.label == KeyLabel.SPACE && it.width <= 0 } // 0 or -1
|
||||
// add zwnj key next to space if necessary
|
||||
val spaceIndex = functionalKeysBottom.indexOfFirst { it.label == KeyLabel.SPACE && it.width <= 0 } // width could be 0 or -1
|
||||
if (spaceIndex >= 0) {
|
||||
if (params.mLocaleKeyboardInfos.hasZwnjKey && params.mId.isAlphabetKeyboard) {
|
||||
// add zwnj key next to space
|
||||
functionalKeysBottom.add(spaceIndex + 1, TextKeyData(label = KeyLabel.ZWNJ))
|
||||
} else if (params.mId.mElementId == KeyboardId.ELEMENT_SYMBOLS) {
|
||||
// add / key next to space, todo (later): not any more, but keep it so this PR can be released without too many people complaining
|
||||
functionalKeysBottom.add(spaceIndex + 1, TextKeyData(label = "/", type = KeyType.FUNCTION))
|
||||
} else if (params.mId.mElementId == KeyboardId.ELEMENT_SYMBOLS_SHIFTED) {
|
||||
// add < and > keys next to space, todo (later): not any more, but keep it so this PR can be released without too many people complaining
|
||||
val key1 = TextKeyData(
|
||||
label = "<",
|
||||
popup = SimplePopups(listOf("!fixedColumnOrder!3", "‹", "≤", "«")),
|
||||
labelFlags = Key.LABEL_FLAGS_HAS_POPUP_HINT,
|
||||
type = KeyType.FUNCTION
|
||||
)
|
||||
val key2 = TextKeyData(
|
||||
label = ">",
|
||||
popup = SimplePopups(listOf("!fixedColumnOrder!3", "›", "≥", "»")),
|
||||
labelFlags = Key.LABEL_FLAGS_HAS_POPUP_HINT,
|
||||
type = KeyType.FUNCTION
|
||||
)
|
||||
functionalKeysBottom.add(spaceIndex + 1, key2)
|
||||
functionalKeysBottom.add(spaceIndex, key1)
|
||||
}
|
||||
}
|
||||
baseKeys.add(mutableListOf())
|
||||
|
|
|
@ -402,6 +402,9 @@ sealed interface KeyData : AbstractKeyData {
|
|||
KeyLabel.SHIFT -> return getShiftBackground(params)
|
||||
}
|
||||
if (type == KeyType.PLACEHOLDER) return Key.BACKGROUND_TYPE_EMPTY
|
||||
if ((params.mId.mElementId == KeyboardId.ELEMENT_SYMBOLS || params.mId.mElementId == KeyboardId.ELEMENT_SYMBOLS_SHIFTED)
|
||||
&& (groupId == GROUP_COMMA || groupId == GROUP_PERIOD))
|
||||
return Key.BACKGROUND_TYPE_FUNCTIONAL
|
||||
return Key.BACKGROUND_TYPE_NORMAL
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue