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 end result can look something like this...or entirely different:
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.
KeyboardKit supports iOS 13
, macOS 11
, tvOS 13
and watchOS 6
.
Although KeyboardKit builds on all platform, some features are unavailable on some platforms.
The best way to install KeyboardKit is to use the Swift Package Manager.
https://github.com/KeyboardKit/KeyboardKit.git
KeyboardKit also supports CocoaPods:
pod KeyboardKit
You can add the library to the main app, the keyboard extension and any other targets that need it.
Once KeyboardKit is added to your project, you can start using it in your application and keyboard extension.
The online documentation contains more information, code examples etc. and makes it easy to overview the various parts of the library.
The online documentation is currently iOS only. To generate documentation for other platforms, open the package in Xcode, select a simulator then run Product/Build Documentation
.
KeyboardKit is localized in 50 keyboard-specific locales:
๐บ๐ธ ๐ฆ๐ฑ ๐ฆ๐ช ๐ง๐พ ๐ง๐ฌ ๐ฆ๐ฉ ๐ญ๐ท ๐จ๐ฟ ๐ฉ๐ฐ ๐ณ๐ฑ
๐ง๐ช ๐ฌ๐ง ๐บ๐ธ ๐ช๐ช ๐ซ๐ด ๐ต๐ญ ๐ซ๐ฎ ๐ซ๐ท ๐ง๐ช ๐จ๐ญ
๐ฌ๐ช ๐ฉ๐ช ๐ฆ๐น ๐จ๐ญ ๐ฌ๐ท ๐ญ๐บ ๐ฎ๐ธ ๐ฎ๐ช ๐ฎ๐น ๐น๐ฏ
๐ฑ๐ป ๐ฑ๐น ๐ฒ๐ฐ ๐ฒ๐น ๐ฒ๐ณ ๐ณ๐ด ๐ฎ๐ท ๐ต๐ฑ ๐ต๐น ๐ง๐ท
๐ท๐ด ๐ท๐บ ๐ท๐ธ ๐ท๐ธ ๐ธ๐ฐ ๐ธ๐ฎ ๐ช๐ธ ๐ธ๐ช ๐น๐ท ๐บ๐ฆ
KeyboardKit comes packed with features. Checkout the list below, and have a look at the documentation, demo apps and source code for even more information and examples.
KeyboardKit comes with many keyboard-specific actions, like character
inputs, emojis
, backspace
, space
, newline
, image
etc. You can even create your own actions.
KeyboardKit comes with an appearance engine that lets you easily style your keyboards.
KeyboardKit defines system audio types and ways to play them.
KeyboardKit can present autocomplete suggestions as users type.
KeyboardKit lets you show input callouts as users type, as well as action callouts with alternate actions for the currently pressed key.
KeyboardKit defines emojis and emoji categories that you can use in your own keyboards.
KeyboardKit provides a bunch of extensions to native types.
KeyboardKit lets you detect whether or not an external keyboard is used.
KeyboardKit keyboards can give audio and haptic feedback as users type.
Read more about audio feedback and haptic feedback.
KeyboardKit comes with keyboard-specific gestures that you can use in your own keyboards.
KeyboardKit defines haptic feedback types and ways to trigger them.
KeyboardKit comes with an input set engine that make it easy to create alphabetic
, numeric
and symbolic
keyboards in different languages.
KeyboardKit comes with a layout engine that makes it easy to create specific keyboard layouts for various devices, orientations and locales.
KeyboardKit comes with many different keyboard types, like alphabetic
, numeric
, symbolic
, emoji
etc. You can even create your own types.
KeyboardKit defines keyboard-specific locales and provides localized content for the supported locales.
KeyboardKit defines a bunch of preview-specific types that simplify previewing keyboard views in SwiftUI.
KeyboardKit defines a bunch of extensions to UITextDocumentProxy
and ways to route text to other sources.
KeyboardKit supports RTL (right-to-left) locales, but your extension need to be configured to support it.
KeyboardKit defines a bunch of styles that simplify customizing the look of various keyboard components.
KeyboardKit comes with a bunch of keyboard-specific views, like keyboards, toobars, buttons etc
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.
This repository contains a Demo
folder with two demo apps that lets you try out KeyboardKit and KeyboardKit Pro:
- The standard demo has a system keyboard that mimics an English keyboard and a unicode-based keyboard.
- The pro demo has a system keyboard with support for all keyboard locales and an
RTL
variant as well.
To run the demo apps, open and run the projects, then enable the keyboards under system settings. Full access is required forfeatures like audio and haptic feedback.
Feel free to reach out if you have questions or if you want to contribute in any way:
- E-mail: [email protected]
- Twitter: @getkeyboardkit
- Web site: getkeyboardkit.com
This project is proudly sponsored by the following companies:
KeyboardKit is free, but please consider sponsoring the project if you find it useful. You can support KeyboardKit through GitHub Sponsors, by signing up for a Pro license, paying for support, donations etc.
KeyboardKit is available under the MIT license. See the LICENSE file for more info.