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:
@@ -0,0 +1,29 @@
|
||||
// HandednessPreference.swift
|
||||
// OSGKeyboard · Shared
|
||||
//
|
||||
// Which hand the user holds the phone with — controls bottom-row key order
|
||||
// on the keyboard (delete ↔ return swap for right-handed use).
|
||||
|
||||
import Foundation
|
||||
|
||||
public enum HandednessPreference: String, CaseIterable, Identifiable, Sendable, Codable {
|
||||
case left
|
||||
case right
|
||||
|
||||
public var id: String { rawValue }
|
||||
|
||||
public var labelKey: String {
|
||||
switch self {
|
||||
case .left: return "settings.handedness.left"
|
||||
case .right: return "settings.handedness.right"
|
||||
}
|
||||
}
|
||||
|
||||
/// Right-handed preference places return on the left and delete on the right.
|
||||
public var swapsActionKeys: Bool { self == .right }
|
||||
|
||||
public static func fromStored(_ raw: String?) -> HandednessPreference {
|
||||
guard let raw, let value = HandednessPreference(rawValue: raw) else { return .left }
|
||||
return value
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user