GitHub - nistruct/KeyboardKit: KeyboardKit is a Swift library that helps you create custom keyboard extensions for iOS and ipadOS. · GitHub
Skip to content

nistruct/KeyboardKit

 
 

Repository files navigation

KeyboardKit Logo

Version Platform Swift 5.6 MIT License Twitter: @getkeyboardkit

About KeyboardKit

KeyboardKit helps you build custom keyboard extensions with Swift and SwiftUI. It extends the native keyboard APIs and provides you with a lot more functionality than is otherwise available.

The result can look like this or completely different:

KeyboardKit supports using entirely custom views, but provides you with a large set of tools and views that make it easy to replicate the native iOS keyboards.

If you're new to iOS keyboard extensions, this great guide will help you get started. You can also have a look at the demo apps for inspiration.

Supported Platforms

KeyboardKit supports iOS 13, macOS 11, tvOS 13 and watchOS 6.

Although KeyboardKit builds on all platform, some features are unavailable on some platforms.

Installation

KeyboardKit can be installed with the Swift Package Manager:

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

or with CocoaPods:

pod KeyboardKit

You can add the library to the main app, the keyboard extension and any other targets that need it.

Getting started

The online documentation has a getting-started guide that will help you get started with the library.

Documentation

The online documentation has articles, code examples etc. that let you overview the various parts of the library.

The online documentation is currently iOS-specific. To generate documentation for other platforms, open the package in Xcode, select a simulator then run Product/Build Documentation.

Note that extensions to native types are not included in this documentation. Future versions of this library will aim at adding protocols for these extensions, to make them appear in the documentation.

🇸🇪 Localization

KeyboardKit is localized in 50+ keyboard-specific locales:

🇺🇸 🇦🇱 🇦🇪 🇧🇾 🇧🇬 🇦🇩 🇭🇷 🇨🇿 🇩🇰 🇳🇱
🇧🇪 🇬🇧 🇺🇸 🇪🇪 🇫🇴 🇵🇭 🇫🇮 🇫🇷 🇨🇭 🇬🇪
🇩🇪 🇦🇹 🇬🇷 🇭🇺 🇮🇸 🇮🇪 🇮🇹 🇹🇯 🇱🇻 🇱🇹
🇲🇰 🇲🇹 🇲🇳 🇳🇴 🇮🇷 🇵🇱 🇵🇹 🇧🇷 🇷🇴 🇷🇺
🇷🇸 🇸🇰 🇸🇮 🇪🇸 🇰🇪 🇸🇪 🇹🇷 🇺🇦 🇺🇸 🇧🇪

Read more here

Features

KeyboardKit comes packed with features to help you build powerful keyboards.

💥 Actions

KeyboardKit comes with many keyboard-specific actions, like character inputs, emojis, backspace, space, newline, image etc. You can even create your own actions.

Read more here

🎨 Appearance

KeyboardKit comes with an appearance engine that lets you easily style your keyboards.

Read more here

🔊 Audio

KeyboardKit defines system audio types and ways to play them.

Read more here

💡Autocomplete

KeyboardKit can present autocomplete suggestions as users type.

Read more here

🗯 Callouts

KeyboardKit lets you show input callouts as users type, as well as action callouts with alternate actions for the currently pressed key.

Read more here

😊 Emojis

KeyboardKit defines emojis and emoji categories that you can use in your own keyboards.

Read more here

🧩 Extensions

KeyboardKit provides a bunch of extensions to native types.

Read more here

⌨️ External Keyboards

KeyboardKit lets you detect whether or not an external keyboard is used.

Read more here

👋 Feedback

KeyboardKit keyboards can give audio and haptic feedback as users type.

Read more about audio feedback and haptic feedback.

👆 Gestures

KeyboardKit comes with keyboard-specific gestures that you can use in your own keyboards.

Read more here

👋 Haptics

KeyboardKit defines haptic feedback types and ways to trigger them.

Read more here

🔤 Input Sets

KeyboardKit comes with an input set engine that make it easy to create alphabetic, numeric and symbolic keyboards in different languages.

Read more here

⌨️ Keyboard Layouts

KeyboardKit comes with a layout engine that makes it easy to create specific keyboard layouts for various devices, orientations and locales.

Read more here

💱 Keyboard Types

KeyboardKit comes with many different keyboard types, like alphabetic, numeric, symbolic, emoji etc. You can even create your own types.

Read more here

🌐 Locales

KeyboardKit defines keyboard-specific locales and provides localized content for the supported locales.

Read more here

👁 Previews

KeyboardKit defines a bunch of preview-specific types that simplify previewing keyboard views in SwiftUI.

Read more here

➡️ Proxy

KeyboardKit defines a bunch of extensions to UITextDocumentProxy and ways to route text to other sources.

Read more here

⬅️ RTL

KeyboardKit supports RTL (right-to-left) locales, but your extension need to be configured to support it.

Read more here

🎨 Styles

KeyboardKit defines a bunch of styles that simplify customizing the look of various keyboard components.

Read more here

🖼 Views

KeyboardKit comes with a bunch of keyboard-specific views, like keyboards, toobars, buttons etc

Read more here

KeyboardKit Pro

KeyboardKit Pro is a license-based extensions that unlocks pro features, such as additional locales, autocomplete, convenience views etc. It can save you a lot of time when developing more complex keyboards.

KeyboardKit Pro is also a way to support this project, which is otherwise completely free and developed by a single person (with great help from the community). If you appreciate this project, consider going Pro.

Read more here

Demo Applications

This repository contains a Demo folder with two demo apps that lets you try out KeyboardKit and KeyboardKit Pro:

Demo

This app sets up KeyboardKit with SPM and lets you type in a light and dark text field.

The app has two different keyboards:

  • The English keyboard uses a SystemKeyboard to mimic a native English keyboard.
  • The Unicode keyboard uses a SystemKeyboard and a custom, unicode-based input set.

Have a look at the app to see how both the app and the keyboard targets must link the KeyboardKit package to work.

Demo - Pro

This app looks and behaves like the demo app, but uses KeyboardKit Pro instead.

The app has two different keyboards:

  • The System LTR keyboard uses a SystemKeyboards and lets you try out all left-to-right locales.
  • The System RTL keyboard uses a SystemKeyboards and lets you try out all right-to-left locales.

Thanks to KeyboardKit Pro, these apps offer autocomplete as well.

Have a look at this app to see how the closed-source KeyboardKit Pro only has to be added to the main app target.

How to run the demo apps

To run the demo apps, open and run these projects, then enable the keyboards you want to try under System Settings.

Note that you need to enable full access to try some features, like audio and haptic feedback.

Contact

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

Support

You can sponsor this project on GitHub Sponsors or get in touch for paid support.

KeyboardKit is proudly sponsored by the following companies:

Oribi Icon phonetoroam Icon Vitalis Icon LetterKey Icon Anomaly Software Icon Milo Creative Icon

KeyboardKit is free, but please consider sponsoring the project or upgrading to KeyboardKit Pro if you find it useful.

License

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

About

KeyboardKit is a Swift library that helps you create custom keyboard extensions for iOS and ipadOS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

  • Swift 99.4%
  • Other 0.6%