KeyboardKit helps you build custom keyboard extensions for iOS
and iPadOS
, using SwiftUI
.
KeyboardKit extends the native keyboard extension APIs to provide you with a lot more functionality. It also provides you with views and utils to help you mimic native keyboards.
The end result can look something like this...or entirely different:
KeyboardKit is flexible and doesn't force your keyboard to look or behave in a certain way. You can go with a standard system keyboard, tweak the standard design a little (or a lot) or use completely custom views or designs.
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 app for inspiration.
The best way to add KeyboardKit to your app is to use the Swift Package Manager:
https://github.com/KeyboardKit/KeyboardKit.git
You can add the library to the main app, the keyboard extension and any other targets that needs it.
Once KeyboardKit is added to your project, you can start using it in your application and keyboard extension.
The KeyboardKit documentation contains extensive information, code examples etc. and makes it easy to overview the various parts of the library.
You can either download the documentation or build it directly in Xcode, using Product/Build Documentation
.
KeyboardKit is localized in the following languages:
-
๐บ๐ธ English
-
๐ฆ๐ฑ Albanian
-
๐ฆ๐ช Arabic
-
๐ง๐พ Belarusian
-
๐จ๐ฟ Czech
-
๐ญ๐ท Croatian
-
๐ฉ๐ฐ Danish
-
๐ณ๐ฑ Dutch
-
๐ง๐ช Dutch (Belgium)
-
๐ฌ๐ง English (UK)
-
๐บ๐ธ English (US)
-
๐ช๐ช Estonian
-
๐ซ๐ฎ Finnish
-
๐ซ๐ท French
-
๐ง๐ช French (Belgium)
-
๐จ๐ญ French (Switzerland)
-
๐ฉ๐ช German
-
๐ฆ๐น German (Austria)
-
๐จ๐ญ German (Switzerland)
-
๐ฌ๐ท Greek
-
๐ญ๐บ Hungarian
-
๐ฎ๐ธ Icelandic
-
๐ฎ๐ช Irish
-
๐ฎ๐น Italian
-
๐น๐ฏ Kurdish Sorani
-
๐ฑ๐ป Latvian
-
๐ฑ๐น Lithuanian
-
๐ณ๐ด Norwegian
-
๐ฎ๐ท Persian
-
๐ต๐ฑ Polish
-
๐ต๐น Portuguese
-
๐ง๐ท Portuguese (Brazil)
-
๐ท๐ด Romanian
-
๐ท๐บ Russian
-
๐ธ๐ฎ Slovenian
-
๐ช๐ธ Spanish
-
๐ธ๐ช Swedish
-
๐น๐ท Turkish
-
๐บ๐ฆ Ukrainian
KeyboardKit also supports localized keyboards, where the keyboard layout, callout actions etc. behave just like they should for a certain locale.
Even though KeyboardKit contains a lot of features, you can use its' extensions and views alone to simplify working with keyboard extensions. For instance, there are a bunch of UITextDocumentProxy
extensions that make your life easier, and views that don't require you to use the rest of the library.
Check out the demo apps and source code for examples and more information.
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 and buttons.
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.
Note that KeyboardKit Pro extends this library by using the same extension points as is available to everyone.
This repository contains a demo app that lets you try out KeyboardKit and KeyboardKit Pro.
The standard keyboard demonstrates different system keyboards, like alphabetical
(lowercased, uppercased and capslocked), numerical
, symbols
and emojis
.
The "RTL" keyboard is the same as the standard keyboard, but with its Info.plist specifying RTL and an RTL primary language.
The demo app is not intended to be production ready, but rather to give you inspiration. Just keep in mind that your keyboards can look anyway you like. They don't have to look like a system keyboard.
To run the demo app, open and run the Demo/Demo.xcodeproj
project, then enable the keyboards under system settings. Enable full access to support all features, like audio and haptic feedback.
KeyboardKit is developed by Daniel Saidi, with great help from the community.
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
KeyboardKit is free, but please consider sponsoring the project to keep it going, if you find it useful.
This project is proudly sponsored by the following companies:
You can support KeyboardKit by sponsoring the project on GitHub Sponsors, signing up for a KeyboardKit Pro license or hiring me for consultation.
KeyboardKit is available under the MIT license. See the LICENSE file for more info.