feat: keyboard bottom-row layout, handedness preference, and screen wake lock

Rework the action cluster to a mic-above-bottom-row layout, add left/right
handedness setting that swaps delete and return, and keep the screen awake
during Flow recording sessions.
This commit is contained in:
Rocky
2026-07-02 21:01:54 +08:00
parent 1bdb8824ac
commit bc77cabb62
18 changed files with 501 additions and 104 deletions
@@ -115,6 +115,7 @@ public final class KeyboardViewController: UIInputViewController {
if isPendingFlowStart || isFlowRecording || isAwaitingFlowResult || awaitingDictationResult {
return
}
ExtensionScreenWakeLock.releaseAll()
cancelPipeline()
}
@@ -396,6 +397,7 @@ public final class KeyboardViewController: UIInputViewController {
isFlowRecording = false
stopUtteranceCountdown()
ExtensionScreenWakeLock.release()
FlowSessionBridge.setRecordingState(.stopped)
state.phase = .processing
state.lastTranscript = ExtL10n.string("keyboard.flow.transcribing")
@@ -412,6 +414,7 @@ public final class KeyboardViewController: UIInputViewController {
isFlowRecording = true
state.lastTranscript = ""
state.phase = .recording
ExtensionScreenWakeLock.acquire(from: view)
startUtteranceCountdown()
startFlowLevelWatchdog()
debug("startFlowRecording")
@@ -574,6 +577,7 @@ public final class KeyboardViewController: UIInputViewController {
if isFlowRecording || isPendingFlowStart {
if isFlowRecording {
FlowSessionBridge.setRecordingState(.aborted)
ExtensionScreenWakeLock.release()
}
isFlowRecording = false
isPendingFlowStart = false