mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-19 16:30:19 +00:00
Allow clear clipboard history toolbar key in normal toolbar (#679)
Co-authored-by: codokie <@> Co-authored-by: Helium314 <helium314@disroot.org>
This commit is contained in:
parent
c98d6d0cc6
commit
2c24f190c1
4 changed files with 8 additions and 7 deletions
|
@ -57,7 +57,7 @@ fun getCodeForToolbarKey(key: ToolbarKey) = when (key) {
|
|||
FULL_LEFT -> KeyCode.MOVE_START_OF_LINE
|
||||
FULL_RIGHT -> KeyCode.MOVE_END_OF_LINE
|
||||
SELECT_WORD -> KeyCode.CLIPBOARD_SELECT_WORD
|
||||
CLEAR_CLIPBOARD -> KeyCode.UNSPECIFIED // not managed via code input. todo: probably it should be
|
||||
CLEAR_CLIPBOARD -> KeyCode.CLIPBOARD_CLEAR_HISTORY
|
||||
CLOSE_HISTORY -> KeyCode.ALPHA
|
||||
}
|
||||
|
||||
|
@ -116,9 +116,9 @@ val toolbarKeyStrings: Set<String> = entries.mapTo(HashSet()) { it.toString().lo
|
|||
|
||||
fun toToolbarKeyString(keys: Collection<ToolbarKey>) = keys.joinToString(";") { it.name }
|
||||
|
||||
val defaultToolbarPref = entries.filterNot { it == CLEAR_CLIPBOARD || it == CLOSE_HISTORY }.joinToString(";") {
|
||||
val defaultToolbarPref = entries.filterNot { it == CLOSE_HISTORY }.joinToString(";") {
|
||||
when (it) {
|
||||
INCOGNITO, AUTOCORRECT, UP, DOWN, ONE_HANDED, FULL_LEFT, FULL_RIGHT, CUT -> "${it.name},false"
|
||||
INCOGNITO, AUTOCORRECT, UP, DOWN, ONE_HANDED, FULL_LEFT, FULL_RIGHT, CUT, CLEAR_CLIPBOARD -> "${it.name},false"
|
||||
else -> "${it.name},true"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue