README
A custom iOS and iPadOS keyboard extension providing a full QWERTY layout plus three additional symbol layers: numbers and punctuation, extended operators, and scientific/mathematical characters.
© 2026 J. W. Bruce Shaw — SciMathKeyboard@gmail.com — scimathkeyboard.com
| Target | Role |
|---|---|
ScientificK | Keyboard extension (UIInputViewController subclass) |
Scientific | Containing app (ContentView.swift, SwiftUI) |
| Layer | Access | Contents |
|---|---|---|
| ABC | Default | QWERTY letters; diacriticals on long-press |
| 123 | 123 button | Numbers, common punctuation; superscripts/subscripts on long-press digits |
| #+= | #+= button | Brackets, operators, currency |
| sci | sci button | ° ± × ÷ ≈ ≠ ≤ ≥ √ ∞ ∑ † ∫ ∂ ∇ Δ ℏ Å µ Ω π ⊙ ∴ ∀ · ∝ ∈ ′ ⊥ |
Layer cycle: 123 → #+= → sci → 123. ABC button returns from any layer.
rebuildAndSwap() pattern for all layout changes — tears down and rebuilds the key grid, swaps atomically. No incremental mutation.PaddedButton subclass provides expanded hit targets beyond visual bounds.UILongPressGestureRecognizer(minimumPressDuration: 0) used for per-key press tracking.UIColor brightening on touchesBegan, not a system animation. Fires on first contact with no gesture recognition delay.needsInputModeSwitchKey). iPad uses advanceToNextInputMode() / handleInputModeList(from:with:) via documented API.UIPanGestureRecognizer in keyboard extensions — .began no longer fires on stationary contact, breaking balloon detection. Filed as FB19394663 / FB19405284, acknowledged by Apple.
Workaround: ImmediatePanGestureRecognizer subclass overrides touchesBegan to force state = .began on first contact. Fork began at v0.400. The workaround uses supported API and remains valid after Apple fixes the underlying bug.
class ImmediatePanGestureRecognizer: UIPanGestureRecognizer {
override func touchesBegan(_ touches: Set<UITouch>,
with event: UIEvent) {
super.touchesBegan(touches, with: event)
state = .began
}
}
Apple updated stock keyboard key appearance in iOS 18, rounding key shapes more aggressively and reducing effective tap target area. If users report missing keys more than expected, this is a known platform change — muscle memory calibrated to pre-iOS 18 geometry is a factor.
SciMath does not request Full Access. It never logs keystrokes, never makes network requests, and contains no analytics or telemetry of any kind. Nothing typed ever leaves the device. The only local storage is the key flash preference. See privacy.html for the full policy.