KeyboardKitPro

8.6-rc1

KeyboardKit Pro helps you create custom keyboards for iOS and iPadOS.
KeyboardKit/KeyboardKitPro

What's New

2024-05-15T19:21:43Z

This version adds support for 5 new locales, support for diacritics, and makes it easier to identify the host application. It also improves many of the localized system keyboards that are provided by Pro.

This version also changes the default autocomplete behavior, by making KeyboardInputViewController only use the pre-cursor part of the current word for autocomplete, which is how the native keyboard behaves.

This version also makes KeyboardKit Pro no longer overwrite custom services that are set before registering a license. This means that you can now apply custom services at any time, without it being overwritten.

This version also reduces load times and memory usage in KeyboardKit Pro, by lazily resolving localized callout action providers and layout providers, and makes all supported locales use the iPad Pro layout.

โœจ Features

  • Keyboard.Accent is a new typealias for diacritics.
  • Keyboard.Diacritic is a new type that lets you model diacritics.
  • KeyboardAction.accent is a new typealias for the .diacritic action.
  • KeyboardAction.diacritic is a new action that lets you insert diacritics.
  • KeyboardController has a new insertDiacritic(_:) function.
  • KeyboardLayout and its Item has much new functionality.
  • KeyboardLocale has new locale-based initializers and matching functions.
  • UITextDocumentProxy has a new insertDiacritic(_:) function.

๐Ÿ’ก Adjustments

  • KeyboardInputViewController autocompleteText now uses the pre-cursor part of the current word, instead of the full word.
  • KeyboardInputViewController hostBundleId has been renamed to hostApplicationBundleId.

๐ŸŒ New Locales

  • French (Canada) - fr_CA
  • Norwegian (Nynorsk) - nn
  • Spanish (Latin America) - es_419
  • Spanish (Mexico) - es_MX
  • Welsh - cy

๐Ÿ‘‘ KeyboardKit Pro

  • Callouts.StandardActionProvider now allocates license services lazily, on demand.

  • Keyboard.ToggleToolbar can now use an external toggle binding.

  • Keyboard.ToggleToolbar no longer relies on a standard AnyView.

  • Keyboard.ToggleToolbarToggle is a new, customizable toolbar toggle.

  • KeyboardContext has a new hostApplication property.

  • KeyboardHostApplication is a new enum with known applications.

  • KeyboardInputViewController has a new hostApplication property.

  • KeyboardInputViewController setupPro no longer creates a new callout provider.

  • KeyboardInputViewController setupPro no longer creates a new layout provider.

  • KeyboardLayout has a new LatinLayoutType enum.

  • KeyboardLayout.ProProvider.Czech now uses proper diacritic keys on iPhone & iPad.

  • KeyboardLayout.StandardProvider now allocates license services lazily, on demand.

  • KeyboardLocale.georgian no longer uses regular font weight in alphabetic keyboard.

  • KeyboardLocale.norwegian has adjusted callout actions.

  • These locales now use iPad Pro layout:

    • Arabic
    • Belarusian
    • Bulgarian
    • Catalan
    • Cherokee
    • Hebrew
    • Kazakh
    • Kurdish Sorani
    • Kurdish Sorani - Arabic
    • Kurdish Sorani - PC
    • Persian
  • These locales have improved iPad Pro layouts:

    • French (Switzerland)
    • Greek
    • Inari Sami
    • Macedonian
    • Mongolian
  • These locales have improved iPhone layouts:

    • Arabic

๐Ÿ› Bug fixes

  • KeyboardAction.tab now uses an LTR/RTL supporting icon.
  • KeyboardContext now matches keyboardLocale on language code as well, to work around system bug.

KeyboardKit Logo

Version Swift 5.9 Swift UI Twitter: @getkeyboardkit Mastodon: @keyboardkit@techhub.social

About KeyboardKit Pro

KeyboardKit is a Swift SDK that lets you create fully customizable keyboards in a few lines of code, using SwiftUI.

KeyboardKit extends Apple's native APIs and provides you with a lot more functionality. It lets you mimic the native iOS keyboard and tweak its style and behavior, or create completely custom keyboards.

Custom iOS keyboard extensions can be used with all other apps that support text input. It's the only way for your product, brand or technology to directly interact with other apps on iOS. Don't miss out!

KeyboardKit Pro extends KeyboardKit with pro features like fully localized keyboards & services, autocomplete, an emoji keyboard, AI supporting capabilities, themes, dictation, and much more.

Commercially Licensed

KeyboardKit Pro is closed source and requires a commercial license.

Licenses can be purchased from the website or from Gumroad.

Installation

KeyboardKit Pro can be installed with the Swift Package Manager:

https://github.com/KeyboardKit/KeyboardKitPro.git

Important! Unlike KeyboardKit, KeyboardKit Pro is a binary target and must only be added to the app target. If you add it to any other target, it may crash at runtime.

Getting started

After installing KeyboardKit Pro, just make your KeyboardViewController inherit KeyboardInputViewController instead of UIInputViewController:

import KeyboardKitPro

class KeyboardController: KeyboardInputViewController {}

This gives your controller access to new lifecycle functions like viewWillSetupKeyboard, observable state like state.keyboardContext, services like services.actionHandler, and much more.

If you just want to use the default SystemKeyboard view, which mimics a native iOS keyboard, you only have to register your license key on launch:

func viewDidLoad() {
    super.viewDidLoad()
    let license = try? setupPro(
        withLicenseKey: "your-key",
        locales: [...], // Define which locales to use 
    ) { license in
        // Make any license-based configurations here 
    }
}

To replace or customize the default SystemKeyboard, just override viewWillSetupKeyboard and call setupPro with a view builder:

class KeyboardViewController: KeyboardInputViewControllerย {

    override func viewWillSetupKeyboard() {
        super.viewWillSetupKeyboard()
        try? setupPro(
            withLicenseKey: "your-key",
            locales: [...], // Define which locales to use
            licenseConfiguration: { license in
                // Make any configurations and service adjustments here
            },
            view: { [weak self] controller in // <-- Use [weak self] or [unowned self] if you need self here.  
                SystemKeyboard(
                    state: controller.state,
                    services: controller.services,
                    buttonContent: { $0.view },
                    buttonView: { $0.view },
                    emojiKeyboard: { $0.view },
                    toolbar: { _ in MyCustomToolbar() }
                )
            }
        )
    }
}

For more information, please see the getting started guide.

Supported Locales

KeyboardKit supports 63 keyboard-specific locales:

๐Ÿ‡ฆ๐Ÿ‡ฑ ๐Ÿ‡ฆ๐Ÿ‡ช ๐Ÿ‡ฆ๐Ÿ‡ฒ ๐Ÿ‡ง๐Ÿ‡พ ๐Ÿ‡ง๐Ÿ‡ฌ ๐Ÿ‡ฆ๐Ÿ‡ฉ ๐Ÿณ๏ธ ๐Ÿ‡ญ๐Ÿ‡ท ๐Ÿ‡จ๐Ÿ‡ฟ ๐Ÿ‡ฉ๐Ÿ‡ฐ
๐Ÿ‡ณ๐Ÿ‡ฑ ๐Ÿ‡ง๐Ÿ‡ช ๐Ÿ‡บ๐Ÿ‡ธ ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ‡บ๐Ÿ‡ธ ๐Ÿ‡ช๐Ÿ‡ช ๐Ÿ‡ซ๐Ÿ‡ด ๐Ÿ‡ต๐Ÿ‡ญ ๐Ÿ‡ซ๐Ÿ‡ฎ ๐Ÿ‡ซ๐Ÿ‡ท
๐Ÿ‡ง๐Ÿ‡ช ๐Ÿ‡จ๐Ÿ‡ญ ๐Ÿ‡ฌ๐Ÿ‡ช ๐Ÿ‡ฉ๐Ÿ‡ช ๐Ÿ‡ฆ๐Ÿ‡น ๐Ÿ‡จ๐Ÿ‡ญ ๐Ÿ‡ฌ๐Ÿ‡ท ๐Ÿ‡บ๐Ÿ‡ธ ๐Ÿ‡ฎ๐Ÿ‡ฑ ๐Ÿ‡ญ๐Ÿ‡บ
๐Ÿ‡ฎ๐Ÿ‡ธ ๐Ÿณ๏ธ ๐Ÿ‡ฎ๐Ÿ‡ฉ ๐Ÿ‡ฎ๐Ÿ‡ช ๐Ÿ‡ฎ๐Ÿ‡น ๐Ÿ‡ฐ๐Ÿ‡ฟ ๐Ÿ‡น๐Ÿ‡ฏ ๐Ÿ‡น๐Ÿ‡ฏ ๐Ÿ‡น๐Ÿ‡ฏ ๐Ÿ‡ฑ๐Ÿ‡ป
๐Ÿ‡ฑ๐Ÿ‡น ๐Ÿ‡ฒ๐Ÿ‡ฐ ๐Ÿ‡ฒ๐Ÿ‡พ ๐Ÿ‡ฒ๐Ÿ‡น ๐Ÿ‡ฒ๐Ÿ‡ณ ๐Ÿ‡ณ๐Ÿ‡ด ๐Ÿณ๏ธ ๐Ÿ‡ฎ๐Ÿ‡ท ๐Ÿ‡ต๐Ÿ‡ฑ ๐Ÿ‡ต๐Ÿ‡น
๐Ÿ‡ง๐Ÿ‡ท ๐Ÿ‡ท๐Ÿ‡ด ๐Ÿ‡ท๐Ÿ‡บ ๐Ÿ‡ท๐Ÿ‡ธ ๐Ÿ‡ท๐Ÿ‡ธ ๐Ÿ‡ธ๐Ÿ‡ฐ ๐Ÿ‡ธ๐Ÿ‡ฎ ๐Ÿ‡ช๐Ÿ‡ธ ๐Ÿ‡ฐ๐Ÿ‡ช ๐Ÿ‡ธ๐Ÿ‡ช
๐Ÿ‡น๐Ÿ‡ท ๐Ÿ‡บ๐Ÿ‡ฆ ๐Ÿ‡บ๐Ÿ‡ฟ

KeyboardKit provides a basic keyboard layout and callout actions, whileย KeyboardKit Pro provides localized layouts, callouts and behaviors for all supported locales.

Features

KeyboardKit Pro extends KeyboardKit with pro features:

  • โŒจ๏ธ Essentials - KeyboardKit Pro unlocks more essential tools, system keyboard previews, etc.
  • ๐Ÿ’ฅ Actions - KeyboardKit Pro auto-registers the most recently used emojis.
  • ๐Ÿค– AI - KeyboardKit Pro unlocks features that are needed for AI.
  • ๐Ÿ“ฑ App - KeyboardKit Pro unlocks app-specific screens & views.
  • ๐Ÿ’ก Autocomplete - KeyboardKit Pro unlocks on-device & remote autocomplete.
  • ๐Ÿ—ฏ Callouts - KeyboardKit Pro unlocks localized callouts for all locales.
  • ๐ŸŽค Dictation - KeyboardKit Pro can perform dictation from the keyboard.
  • ๐Ÿ˜€ Emojis - KeyboardKit Pro unlocks a powerful emoji keyboard.
  • โŒจ๏ธ External - KeyboardKit Pro can detect if an external keyboard is connected.
  • ๐Ÿ”‰ Feedback - KeyboardKit Pro unlocks tools for toogling feedback on & off.
  • ๐Ÿ  Host - KeyboardKit Pro can identify specific host applications.
  • ๐Ÿ”ฃ Layout - KeyboardKit Pro unlocks localized layouts for all locales.
  • ๐ŸŒ Localization - KeyboardKit Pro unlocks 63 locale-specific services and system keyboards.
  • ๐Ÿ‘ Previews - KeyboardKit Pro unlocks system keyboard and theme previews.
  • โžก๏ธ Proxy - KeyboardKit Pro unlocks ways for UIKit/UITextDocumentProxy to read the full document.
  • ๐Ÿ“ Text - KeyboardKit Pro unlocks tools to let you type within the keyboard.
  • ๐Ÿญ Themes - KeyboardKit Pro unlocks a theme engine with many pre-defined themes.

Every article in the documentation describes in detail what KeyboardKit Pro unlocks for that part of the SDK.

Documentation

The online documentation has more information, articles, code examples, etc.

Demo App

The KeyboardKit repository has a demo app that shows how to display keyboard state, link to system settings, etc.

The demo app has two demo keyboards:

  • Keyboard uses KeyboardKit and a customized SystemKeyboard.
  • KeyboardPro uses KeyboardKit Pro and enables all locales, autocomplete, themes, etc.

Just open and run the demo app in the Demo folder, then enable the keyboards under System Settings. Note that you need to enable full access for some features to work.

KeyboardKit App

If you want to try KeyboardKit Pro without having to write any code or build the demo app from Xcode, there is a KeyboardKit app in the App Store, that lets you try out many pro features.

Contact

Feel free to reach out if you have questions or if you want to contribute in any way:

Commercially Licensed

KeyboardKit Pro is closed source. See the LICENSE file for more info.

Commercial licenses can be purchased from the website or from Gumroad.

Description

  • Swift Tools 5.9.0
View More Packages from this Author

Dependencies

  • None
Last updated: Sat May 18 2024 06:15:36 GMT-0900 (Hawaii-Aleutian Daylight Time)