github LeanBitLab/LeanType v4.3.2

one hour ago

๐Ÿ’– Support Our Work

Keep LeanType fast and independent. As a community-funded, open-source project, we rely on users like you to stay alive. If LeanType saves you time every day, consider backing us on GitHub Sponsors or Open Collective or simply share it with a friend!

๐Ÿš€ LeanType 4.3.2


โœจ Added

  • Unicode Font Style Engine & Stylizer: Added complete typographic Unicode styling engine with 26+ canonical font styles (Bold, Italic, Script, Fraktur, Double-Struck, Sans-Serif, Monospace, Fullwidth, Small Caps, Circled, Squared, Inverted, Strikethrough, Underline, etc.) featuring instant live typing transformation, gesture typing support, and plain text normalization. Includes an interactive style preview strip (StylePreviewStripView), a dedicated settings screen under Libraries & Tools, and toolbar integration.
  • Topic-Categorized Unicode Symbol Palette (#776): Added a comprehensive Unicode symbol palette tab to the emoji view, categorized by topics (Arrows, Math, Typographic, Geometric, Stars, Weather, Music, Technical, Currency, etc.) with a horizontally scrollable category bar in EmojiPalettesView.
  • Text Expander Image & Photo Shortcuts (#784): Added photo and image attachment support to Text Expander shortcuts. Renders live image thumbnails and labels in the suggestion strip styled as rounded pill chips, directly inserts images via InputConnectionCompat.commitContent with seamless fallback to the Android system share sheet, and stores images securely in private internal storage for 100% offline availability.
  • Text Expander Suggestions & Suggestion-Only Mode (#774): Text Expander shortcuts are now surfaced as interactive suggestions in the suggestion strip. Added a dedicated "Suggestion only" mode in Text Expander settings, allowing users to expand shortcuts exclusively from suggestion chips rather than expanding automatically on space or punctuation.
  • Text Expander Full-Screen Bulk Editor: Added a comprehensive full-screen editor to view, edit, import, and export all text shortcuts in human-readable plain text format (=== shortcut === syntax). Includes real-time syntax error checking with exact line numbers, a change preview dialog detailing added, modified, and deleted items, and %tab% variable support for inserting tab characters.
  • Text Expander Autocomplete Shortcuts Toggle: Added an optional setting under Text Expander (PREF_PREFIX_AUTOCOMPLETE, disabled by default) to suggest partial matches for unprefixed text and image shortcuts after typing 2+ characters as well as prefixed image shortcuts, while keeping explicitly prefixed text shortcuts autocompleting normally.
  • Bracket, Symbol & CJK Quote Auto-Pairing (#754): Added automatic closing symbol insertion in Text Correction settings for brackets (), [], {}, <>, quotation marks, and CJK book and quotation marks (ใ€Šใ€‹, ใ€Œใ€, ใ€Žใ€, ใ€ใ€‘). Includes cursor step-over when manually typing the matching closing mark and pair deletion when backspacing an empty pair.
  • Automation Broadcast Receiver for Layout & Subtype Switching (#501): Added external broadcast intent support (ACTION_SWITCH_SUBTYPE, ACTION_SWITCH_LAYOUT, ACTION_SWITCH_MODE) for automation apps (Tasker, Automate, MacroDroid, ADB shell). Allows switching keyboard modes (alpha, symbols, numpad, emoji, clipboard, text_edit, one_handed), cycling subtypes sequentially, jumping to specific subtype indices, and matching target languages, locales, or layout names.
  • Arabic Period Key Diacritics Hint (#786): Added a centered visual diacritics hint to the period key on Arabic keyboards in alphabet mode, providing immediate discoverability and quick access to essential Arabic tashkeel marks.
  • Extended Voice Dictation Duration: Added 10-minute and unlimited voice dictation recording duration options.
  • Plain Text Export for User Dictionaries (#431): Added plain text export functionality in Personal Dictionary settings, enabling users to export all user dictionaries or individual locale wordlists to standard .txt files compatible with third-party tools and backup utilities.
  • Elevated Active Keyboards on Language Screen: Redesigned the Languages settings screen to elevate all active keyboards to the top of the list, displaying primary layout names, subtype tags, and direct layout switching for simplified multi-layout management.
  • Always Reopen on Main Alphabet Keyboard: Added an option in settings to always reopen the keyboard on the primary alphabet view, automatically resetting secondary symbol, numpad, or emoji states when the keyboard is dismissed and reopened.
  • Suppress Repeating Auto-Correction Reverted by Backspace (#415): Integrated RevertedCorrectionHistory in the suggestion engine to remember corrections reverted by backspacing, preventing the keyboard from repeatedly re-applying the unwanted auto-correction on subsequent space presses in the same input session.
  • Prioritized Inline Autofill on Password Fields (#416): Elevated inline autofill credential chips prominently above password and account fields for immediate access during logins.
  • Clipboard Clip Editing & Live Character Counter (#678): Rebuilt the inline clipboard clip editor with a live character counter and streamlined action buttons in ClipboardHistoryView.
  • Localized Number Row Popup Reordering & Toggles (#721): Added user controls in Preferences and Subtype screens to toggle and reorder localized numeral systems (such as Arabic-Indic, Eastern Arabic, Devanagari, and Bengali) in number row popups.
  • Restart Keyboard Process Option: Added a dedicated "Restart keyboard" option in About settings to cleanly reload models, plugins, and background services.
  • Auto-Correct Underline Indicator Toggle: Added a toggle in Text Correction settings to enable or disable the indicator underline displayed beneath auto-corrected words.
  • Skip Setup Wizard to Browse Settings (#768): Added the ability to skip the initial setup wizard to explore and customize settings prior to enabling the keyboard, with a setup banner on the main settings screen and wizard relaunch from About.

๐Ÿ› Fixed & Hardened

  • Fast Typing Duplicate Capitalization & Auto-Caps Race (#598, #743): Resolved capitalization timing bugs during rapid typing and multi-finger gestures. Evaluates pointer state via hasOlderLetterKeyDown() so held spacebars or sentence boundary punctuation do not prematurely unshift auto-caps, preserves shift-retention states across key detection cycles, allows case-insensitive character matching without fragile queue element lifetimes, and guards cursor capitalization calculations against asynchronous selection updates and empty text cache invalidations.
  • Single-Line Text Field Auto-Correction: Enabled auto-correction for standard single-line text inputs (messaging apps, SMS, notes, and search fields). Removed the strict multi-line flag requirement while strictly preserving protections for passwords, email addresses, URIs, and fields requesting no suggestions.
  • CJK Pinyin Uppercase Preservation & Shift State (#787): Fixed Pinyin composition in CjkInputManager and LatinIME to preserve typed uppercase characters and active shift states instead of lowercasing letters prematurely when mixing acronyms or English words with Pinyin input.
  • Foldable & Tablet Unfolded Split Detection (#778): Adjusted dimension thresholds in ScreenProfile so book-style foldables (e.g. Galaxy Z Fold, Pixel Fold) in portrait orientation correctly detect ScreenProfile.LARGE even when smallestScreenWidthDp reports outer-screen metrics (360-400dp). Decoupled unfolded split keyboard settings (PREF_ENABLE_SPLIT_KEYBOARD_UNFOLDED) from compact split preferences so enabling/disabling split mode on the outer screen never clobbers inner screen preferences.
  • Multi-Row Popup Key Hitboxes: Fixed inverted top and bottom edge flags in PopupKeysKeyboard.Builder.markAsEdgeKey, eliminating overlapping touch hitboxes across rows in multi-row popup panels such as the 2-row Arabic punctuation popup.
  • Lock-Screen & Keyguard Security Hardening: Guarded sensitive keyboard actions and automation receivers while the device is locked (isDeviceLocked). Blocks clipboard access, paste operations, clipboard history clearing, settings access, IME switching, AI features, translation, and intent dispatch keys from keyguard/lock screens, and ignores external automation broadcast switching when locked or focused on password fields.
  • InputConnection IPC Hardening & Resilience: Defensively wrapped all critical InputConnection IPC calls across RichInputConnection with graceful fallback handling to prevent crashes caused by buggy, unresponsive, or terminating host applications.
  • Voice Input Leak & Watchdog Timeouts: Unconditionally terminates voice recording sessions and audio loops on keyboard window hide and input finish, adds watchdog timeouts for plugin connection (8s) and final processing (15s) to eliminate hung states, unbinds voice services when hidden or trimming memory, and binds services without foreground elevation.
  • Voice Screen-On Auto-Release: Automatically releases keep-screen-on flags after prolonged voice silence to prevent battery drain.
  • Layout Popup Keys Priority Over Auto-Generated Symbols (#772): Reordered default popup key priority (POPUP_KEYS_LAYOUT before POPUP_KEYS_SYMBOLS) and migrated legacy preferences so explicitly defined layout popups (such as Bengali 'เฆ–' on 'เฆ•') are directly accessible instead of being buried behind secondary mathematical and punctuation symbols.
  • Text Expander Image Reliability, MIME Gating & Exact Match (#784): Hardened image storage, normalization, async import, and missing-file fallback UX. Supported image shortcuts during immediate and separator expansion, gated expansion on host editor MIME type compatibility, loaded thumbnails asynchronously to prevent UI stutters, required exact matching for unprefixed and image shortcuts, preserved add/edit dialog state across configuration changes, and deduplicated/included text_expander_images in dictionary backup/restore archives.
  • Emoji Inline Search Pinning & Horizontal Result Scrolling: Pinned the emoji inline search bar in place and introduced EmojiTabStripScrollView to allow smooth independent horizontal result scrolling without shifting the search input out of view.
  • Floating Mode Split Keyboard Suppression: Automatically suppresses split keyboard layouts when floating keyboard mode is active, preventing visual overlap and key positioning glitches.
  • Shift & Auto-Caps Reload Desynchronization (#598): Prevented shift state desynchronization during keyboard reloads and unshifting. Calling setShiftLocked(false) preserves active auto-caps modes in AlphabetShiftState, auto-caps is properly retained across KeyboardState.onRestoreKeyboardState cache reloads, and isDisplayedAlphabetShifted layout inspection enforces unshift visual switches when displayed layouts are shifted.
  • Live Font Typing Isolation & Leaking Guard: Protected password, URL, email, phone, and non-text input fields from live font styling in InputLogic, automatically resets active live styling when switching application packages in LatinIME to prevent leaking decorative styles into system searches or terminal apps, and isolates user history dictionaries (UserHistoryDictionary, TextExpander) from styled characters.
  • Window Leak & Process Lifecycle Fixes: Automatically dismisses active dialog windows on keyboard destruction to prevent Android window manager memory leaks, and guards against uninitialized clipboard database access during shutdown.
  • Settings Safe Drawing Insets: Reinstated full-screen safe drawing insets across Compose scaffolds in SettingsActivity, ensuring headers and action buttons never overlap the system status bar or camera cutouts on modern edge-to-edge Android displays.
  • Custom Theme Functional Keys & Spacebar Pressed Color (#771): Fixed pressed feedback colors on functional keys and spacebar in custom borderless color palettes, ensuring responsive and consistent visual feedback on keypress across all theme variations.
  • Supplementary Plane KeyCode Truncation Guard: Guarded codePointToKeyEventCode against int-to-char truncation for Unicode supplementary plane characters (code points 0x10000 and above).
  • Clipboard Search & Toolbar Alignment: Canceling clipboard search via the close button or Back key now cleanly resets active query filters, tapping the search toolbar key clears active search filters, recycled clip viewholders correctly bind pinned icons and colors, and clipboard toolbar keys honor layout alignment settings.

โšก Performance & Battery

  • Idle Battery, Main-Thread Looper & Animator Lifecycle: Eliminated hidden main-thread Looper spins, background view animators, and idle voice service bindings when keyboard views (ClipboardHistoryView, EmojiPalettesView, GifPickerView, OcrCameraView, SuggestionStripView, VoiceVisualizerView) are hidden or detached. Made VoiceSettingsScreen plugin binding and status polling strictly lifecycle-aware, marshaled binder disconnects to the main thread, and respected keep-loaded settings during UI hide.
  • Battery & Resource Drain Prevention: Unconditionally releases the OCR camera preview on view detachment and keyboard dismissals, and eliminates a potential 100% CPU busy-spin loop in audio recording streams when read buffers report 0 bytes.
  • Keyguard & Lock State Caching: Cached device lock status with a 2-second TTL in IsLockedCompat to eliminate expensive repeated KeyguardManager Binder IPC calls during fast typing.
  • Memory Trimming & Native Plugin Lifecycle: Hooked handwriting, CJK, translation, and speech plugin unloads into LatinIME.onTrimMemory to immediately reclaim native heap under low-memory conditions, protected offline AI model unloading during active inference, and capped custom sound manager preview caches.
  • Asynchronous Clipboard Image Decoding: Decodes clipboard image thumbnails asynchronously off the main thread with exact downsampling in ClipboardAdapter, eliminating UI freezes when browsing rich media clips.
  • Text Expander Thumbnail Caching & Eviction: Pre-warms image thumbnails on a background executor, caches decoded bitmaps in memory with exact downsampling (inSampleSize), and evicts all dimension variants from the cache when shortcuts are deleted or edited.
  • SupervisorJob Coroutine Isolation: Wrapped background coroutine scopes with SupervisorJob to isolate coroutine failures and prevent child task cancellations from tearing down root application scopes or leaking activity references.

๐Ÿงน Maintenance & Testing

  • Repository & Release Link Updates: Updated repository, release, and documentation URLs across Constants.kt and LibrariesHubScreen.kt from HeliboardL to LeanType.
  • String Resource Deduplication & Complete Translations: Consolidated common action strings, pruned redundant string resources across 107 localization files, and added 100% complete translation coverage across all 30 supported languages for all newly added settings, dialogs, and features.
  • Settings Navigation Pipeline: Streamlined the settings navigation channel and flattened scaffold hierarchies for smoother Compose screen transitions.
  • Comprehensive Robolectric Unit Test Suite Expansion: Added extensive unit test suites across KeyboardStateShiftTest.kt (fast typing, shift retention, auto-caps), UnicodeStyleEngineTest.kt (Unicode style transformations, normalization), ScreenProfileTest.kt (foldables, split dimensions), InputAttributesTest.kt (single-line auto-correction attributes), TextExpanderTabTest.kt and TextExpanderImageUtilsTest.kt (text and image shortcut parsing, matching, and MIME gating), PopupKeysKeyboardTest.kt (multi-row popup hit detection), CjkEngineTest.kt (Pinyin uppercase preservation), VoicePluginManagerTest.kt (voice plugin lifecycles and timeouts), and AnimatorAndScrollLifecycleTest.kt (view animator and Looper lifecycle).

๐Ÿ“ฆ Choose Your Flavor

Flavor Primary Focus AI Engine Plugins Setup Internet Release Updater Size
1-LeanType_4.3.2-standard-release.apk Recommended Cloud AI In-app download or File import Optional (AI/plugins) โœ… View Release 12.8 MB
2-LeanType_4.3.2-offline-release.apk Offline Local LLM Plugin (8.0+) Browser download + File import ๐Ÿšซ Zero Internet (No Permission) โŒ None 12.5 MB

๐Ÿ’ก Plugin Compatibility: All flavors support Offline Voice Dictation (Android 8.1+), Offline Translation (Android 6.0+), Offline Handwriting Recognition (Android 6.0+), Offline OCR Text Extraction (Android 5.0+), and Offline AI Proofreading (Android 8.0+, 64-bit) via modular plugins, and work 100% offline.

Don't miss a new LeanType release

NewReleases is sending notifications on new releases.