KeyboardKit

8.3.4

KeyboardKit is a Swift SDK that lets you create fully customizable keyboard with a few lines of code, using SwiftUI.
KeyboardKit/KeyboardKit

What's New

2024-03-08T12:43:45Z

This version just updates some Pro licenses.

KeyboardKit Logo

Version Swift 5.8 MIT License Twitter: @@getkeyboardkit Mastodon: @keyboardkit@techhub.social

About KeyboardKit

KeyboardKit helps you create custom keyboard extensions with Swift and SwiftUI.

KeyboardKit extends Apple's native APIs and provides you with a lot more functionality. It lets you create custom keyboards that mimic native iOS keyboards with just a few lines of code.

KeyboardKit lets you customize all parts of the keyboard. You can use custom layouts, designs, behavior, etc. and make any key or gesture trigger any action. You can even use completely custom views and just use the underlying functionality.

You can use KeyboardKit in many different ways. Keyboard extensions can use it to create custom keyboards. Apps can use it to check keyboard enabled state, full access, state, provide settings etc. Furthermore, any target can use it to build upon its models and functionality.

Installation

KeyboardKit can be installed with the Swift Package Manager:

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

After installing KeyboardKit, make sure to link it to all targets that need it.

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 comes packed features to help you build amazing keyboard extensions:

  • โŒจ๏ธ Essentials - KeyboardKit comes with a bunch of essential features and types.
  • ๐Ÿ’ฅ Actions - KeyboardKit has keyboard actions like characters, actions, etc.
  • ๐Ÿค– AI Support - KeyboardKit unlocks capabilities that are needed for AI.
  • ๐Ÿ’ก Autocomplete - KeyboardKit can perform autocomplete and autocorrect.
  • ๐Ÿ”ค Buttons - KeyboardKit can style any view as a keyboard button.
  • ๐Ÿ—ฏ Callouts - KeyboardKit can show input and secondary callouts.
  • ๐ŸŒˆ Colors - KeyboardKit defines a bunch of keyboard-related colors.
  • ๐Ÿ“ฑ Device Utilities - KeyboardKit has a bunch of device-specific utilities.
  • ๐ŸŽค Dictation (BETA) - KeyboardKit can perform dictation from the keyboard.
  • ๐Ÿ˜€ Emojis - KeyboardKit defines an emoji type with a lot of information.
  • โŒจ๏ธ External Keyboards - KeyboardKit can detect external keyboards.
  • ๐Ÿ”‰ Feedback - KeyboardKit can trigger audio and haptic feedback.
  • ๐Ÿ‘† Gestures - KeyboardKit has rich, keyboard-specific gestures.
  • ๐Ÿ–ผ๏ธ Images - KeyboardKit defines a bunch of keyboard-related images.
  • ๐Ÿ”ฃ Layout - KeyboardKit defines dynamic input sets and keyboard layouts.
  • ๐ŸŒ Localization - KeyboardKit supports 63 locales.
  • ๐Ÿ—บ๏ธ Navigation - KeyboardKit lets you open urls and other apps.
  • ๐Ÿ‘ Previews - KeyboardKit lets you preview views and components in SwiftUI.
  • โžก๏ธ Proxy Extensions - KeyboardKit makes UITextDocumentProxy do a LOT more.
  • โš™๏ธ Settings - KeyboardKit has a bunch of settings tools.
  • ๐Ÿฉบ State - KeyboardKit lets you detect if a keyboard is enabled, has full access, etc.
  • ๐ŸŽจ Styling - KeyboardKit lets you style your keyboards to great extent.
  • ๐Ÿš Text Routing - KeyboardKit can route text to other places.
  • ๐ŸŒ Views - KeyboardKit defines a bunch of keyboard-related views and modifiers.

KeyboardKit Pro extends KeyboardKit with a lot of Pro features, such as localized keyboards and services, autocomplete, autocorrect, dictation, emoji keyboards and features, themes, etc.

Getting Started

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

import KeyboardKit

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.

KeyboardKit will use a SystemKeyboard as the default keyboard view. To customize or replace it, override viewWillSetupKeyboard() and call any setup function with any custom view:

class KeyboardViewController: KeyboardInputViewControllerย {

    override func viewWillSetupKeyboard() {
        super.viewWillSetupKeyboard()
        setup { controller in
            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.

Documentation

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

Demo App

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

The app has two keyboards:

  • Keyboard uses KeyboardKit and a customized SystemKeyboard.
  • KeyboardPro uses KeyboardKit Pro and a customized SystemKeyboard with 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, like haptic feedback.

KeyboardKit App

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

Support This Project

KeyboardKit is open-source and completely free, but you can sponsor this project on GitHub Sponsors, upgrade to KeyboardKit Pro or get in touch for freelance work, paid support etc.

Contact

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

License

KeyboardKit is available under the MIT license. See the LICENSE file for more info.

Description

  • Swift Tools 5.8.0
View More Packages from this Author

Dependencies

Last updated: Thu Mar 28 2024 16:29:48 GMT-0900 (Hawaii-Aleutian Daylight Time)