Fast progress

This commit is contained in:
zb
2023-08-25 16:45:45 +02:00
parent 40a21c6588
commit 0a39862571
8 changed files with 72 additions and 19 deletions

View File

@@ -11,6 +11,8 @@ enum class Command {
SHIFT_MODE,
SWITCH_MODE,
NAVIGATE,
RIGHT,
LEFT,
RECORD,
TRANSCRIBE
}

View File

@@ -39,12 +39,12 @@ class KeyCommandResolver (
Key.N8 to Command.CHARACTER,
Key.N9 to Command.CHARACTER,
Key.LEFT to Command.NAVIGATE,
Key.RIGHT to Command.NAVIGATE,
Key.LEFT to Command.LEFT,
Key.RIGHT to Command.RIGHT,
Key.UP to Command.NAVIGATE,
Key.DOWN to Command.NAVIGATE,
Key.STAR to Command.CYCLE_CANDIDATES,
Key.STAR to Command.DELETE,
Key.DELETE to Command.DELETE,
Key.SELECT to Command.SELECT
)),
@@ -70,12 +70,11 @@ class KeyCommandResolver (
)),
afterLong = HashMap(mapOf(
Key.DELETE to Command.DELETE,
Key.SELECT to Command.TRANSCRIBE,
)),
onRepeat = HashMap(mapOf(
Key.DELETE to Command.DELETE,
Key.STAR to Command.DELETE,
))
)
}

View File

@@ -8,5 +8,8 @@ data class KeyEventResult(
val startComposing: Boolean = false,
val codeWord: StringBuilder? = null,
val candidates: List<String>? = null,
val deleteBeforeCursor: Int = 0,
val deleteAfterCursor: Int = 0,
val left: Boolean = false,
val right: Boolean = false
)