Skip to content

KeyboardKit Pro lets you create custom keyboards using Swift & SwiftUI.

License

Notifications You must be signed in to change notification settings

KeyboardKit/KeyboardKitPro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

KeyboardKit Pro Logo

Version Swift 5.9 Documentation Documentation

About KeyboardKit Pro

KeyboardKit lets you create amazing custom keyboards with a few lines of code, using Swift & SwiftUI.

KeyboardKit extends Apple's limited keyboard APIs with more capabilities. KeyboardKit Pro extends further by unlocking localized keyboards, autocomplete, an emoji keyboard, AI support, themes, and much more.

Commercial License

KeyboardKit Pro requires a license to be used. You can sign up on the KeyboardKit website or the Gumroad store.

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 linked to the app target.

Getting started

The easiest way to set up KeyboardKit is to first create a KeyboardApp value for your app:

extension KeyboardApp {

        static var keyboardKitDemo: KeyboardApp {
        .init(
            name: "KeyboardKit",
            licenseKey: "your-key-here",                // Sets up KeyboardKit Pro!
            appGroupId: "group.com.keyboardkit.demo",   // Sets up App Group data sync
            locales: .keyboardKitSupported,             // Sets up the enabled locales
            autocomplete: .init(                        // Sets up custom autocomplete  
                nextWordPredictionRequest: .claude(...) // Sets up AI-based prediction
            ),
            deepLinks: .init(app: "kkdemo://", ...)     // Defines how to open the app
        )
    }
}

Next, let your KeyboardController inherit KeyboardInputViewController instead of UIInputViewController:

class KeyboardController: KeyboardInputViewController {}

This unlocks additional functions and capabilities, and injects services and observable state to the controller.

Next, override viewDidLoad() and call setupPro(for:) with your app value:

class KeyboardViewController: KeyboardInputViewControllerย {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        setup(for: .keyboardKitDemo) { result in
            // If result is successful, KeyboardKit Pro is now active
            // You can now customize your keyboard and tweak features 
        }
    }
}

To replace or customize the standard KeyboardView view, just override viewWillSetupKeyboardView() and call setupKeyboardView(with:) with the view that you want to use:

class KeyboardViewController: KeyboardInputViewControllerย {

    override func viewWillSetupKeyboardView() {
        setupKeyboardView { [weak self] controller in // <-- Use weak or unknowned self!
            KeyboardView(
                state: controller.state,
                services: controller.services,
                buttonContent: { $0.view },
                buttonView: { $0.view },
                collapsedView: { $0.view },
                emojiKeyboard: { $0.view },
                toolbar: { $0.view }
            )
        }
    }
}

To set up your main app with the same keyboard configuration, just wrap the content view in a KeyboardAppView:

@main
struct MyApp: App {

    var body: some Scene {
        WindowGroup {
            KeyboardAppView(for: .keyboardKitDemo) {
                ContentView()
            }
        }
    }
}

For more information, see the getting started guide and essentials articles.

Localization

KeyboardKit supports 71 keyboard-specific locales:

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

KeyboardKit only includes localized strings, whileย KeyboardKit Pro unlocks localized keyboards, layouts, callouts and behaviors for all supported locales.

Features

KeyboardKit provides a free, open-source keyboard engine. KeyboardKit Pro unlocks more powerful pro features.

Open-Source

  • ๐ŸŒฑ Essentials - Essential keyboard utilities, models, services & views.
  • โŒจ๏ธ Essentials-KeyboardView - Render a native-looking, customizable iOS keyboard.
  • ๐Ÿ’ฅ Actions - Trigger & handle keyboard-related actions.
  • ๐Ÿ“ฑ App - Define and set up your app, settings, etc.
  • ๐Ÿ’ก Autocomplete - Perform autocomplete as the user types.
  • ๐Ÿ—ฏ Callouts - Show input & secondary action callouts.
  • ๐Ÿ–ฅ๏ธ Device - Identify device type, device capabilities, etc.
  • ๐Ÿ˜€ Emojis - Emojis, categories, versions, skin tones, etc.
  • ๐Ÿ”‰ Feedback - Trigger audio & haptic feedback with ease.
  • ๐Ÿ‘† Gestures - Handle a rich set of gestures on any key.
  • ๐Ÿ”ฃ Layout - Define and customize dynamic keyboard layouts.
  • ๐ŸŒ Localization - Localize your keyboard in 71 locales.
  • ๐Ÿ—บ๏ธ Navigation - Open urls and other apps from the keyboard.
  • ๐Ÿ‘ Previews - Extensive SwiftUI preview support.
  • ๐Ÿ“„ Proxy - Extend the text document proxy with more capabilities.
  • โš™๏ธ Settings - Provide keyboard settings & link to System Settings.
  • ๐Ÿฉบ Status - Detect if a keyboard is enabled, has full access, etc.
  • ๐ŸŽจ Styling - Style your keyboard to great extent.

KeyboardKit Pro

  • ๐ŸŒฑ Essentials - More essential tools, previews, toolbars, etc.
  • โŒจ๏ธ Essentials-KeyboardView - Make the keyboard view do a lot more.
  • ๐Ÿค– AI - Features that are needed for AI.
  • ๐Ÿ“ฑ App - App-specific screens & views.
  • ๐Ÿ’ก Autocomplete - Local & remote autocomplete, next word prediction, etc.
  • ๐Ÿ—ฏ Callouts - Localized callout actions for all supported locales.
  • ๐ŸŽค Dictation - Dictate text from the keyboard.
  • ๐Ÿ˜€ Emojis - A powerful emoji keyboard, search, etc.
  • โŒจ๏ธ External - Auto-detect if an external keyboard is connected.
  • ๐Ÿ  Host - Identify and open specific host applications.
  • ๐Ÿ”ฃ Layout - Localized layouts for all supported locales.
  • ๐ŸŒ Localization - Services & views for all supported locales.
  • ๐Ÿ‘ Previews - Keyboard & theme previews for in-app use.
  • ๐Ÿ“„ Proxy - Allow UITextDocumentProxy to read the full document.
  • ๐Ÿ“ Text - Allow users to type within the keyboard.
  • ๐Ÿญ Themes - A theme engine with many pre-defined themes.

Documentation

The online documentation has a thorough getting-started guide, a detailed article for each feature, code samples, etc. You can also build it from the source code to get better formatting.

Demo App

The main repository has a demo app that shows how to set up the main keyboard app, show keyboard status, provide in-app settings, link to system settings, apply custom styles, etc.

The app has two keyboards - a Keyboard that uses KeyboardKit and a KeyboardPro that uses KeyboardKit Pro.

Important

The demo isn't code signed and can therefore not use an App Group to sync settings between the app and its keyboards. As such, the KeyboardPro keyboard has keyboard settings in the keyboard as well.

KeyboardKit App

If you want to try KeyboardKit without having to write any code or build the demo app from Xcode, the KeyboardKit app lets you try out many features by just downloading it from the App Store.

Contact

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

Commercial License

KeyboardKit Pro requires a license to be used. You can sign up on the KeyboardKit website or the Gumroad store.