How dessalines/thumb-key works
Project type and purpose
• This is an Android Input Method Editor (IME) app called “Thumb-Key.”
• It implements a smart, privacy-conscious keyboard using Jetpack Compose and the Android IME APIs.
High-level architectural layers
• Android Platform & IME Framework
• App boundary:
• IMEService (bridge to Android IME APIs)
• ComposeKeyboardView (Compose UI presentation)
• MainActivity & Settings Screens (Compose UI for configuration)
• Domain logic: keyboard layouts, swipe logic, modifications
• Data layer: Room database (AppDb) and YAML config assets
• External services: other IMEs (voice input), publishing pipelines (Fastlane, F-Droid, Play Store)
Main components
a. Android IME Framework (InputMethodManager)
b. IMEService.kt
c. ComposeKeyboardView.kt
d. Keyboard definitions package (com.dessalines.thumbkey.keyboards)
e. KeyboardModificationService & KeyboardLayout utils
f. UI components package (com.dessalines.thumbkey.ui)
g. Room Data layer (AppDb.kt)
h. Assets (YAML modifier files in app/src/main/assets)
i. Settings screens (SetupScreen, BehaviorScreen, etc.)
j. External voice IME services (FUTO Voice, Transcribro, Whisper IME)
Relationships and data flow
• At startup: IMEService registers with Android IME Framework → loads configuration from assets and Room DB via KeyboardModificationService → instantiates ComposeKeyboardView and Settings UI.
• User taps/swipes on ComposeKeyboardView → events dispatched to IMEService → domain logic (KeyboardLayout + AutoCapitalizers, Utils) computes output → IMEService.commitText() to Android.
• Settings changes in MainActivity → write/read to Room DB → triggers recomposition of UI and reloading of layouts.
• Voice input: IMEService triggers Android’s InputMethodManager.switchToNextInputMethod or external IME services.
Architectural patterns & principles
• Layered architecture: Presentation (Compose) → Domain (keyboard logic) → Data (Room + asset configs)
• Separation of concerns: IMEService as system boundary; Compose UIs isolated in ui/components; keyboard definitions isolated in keyboards package; config and persistence in data/util classes.
• Use of Jetpack Compose for declarative UI; Room for local persistence; Android IME API for text input.