KeyboardKit is a Swift library that helps you build custom keyboards 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:
KeyboardKit lets you create keyboards that mimic the iOS stock keyboard in a single line of code. These keyboards can be customized to great extent to change their input keys, keyboard layout, design, behavior etc.
You can also use entirely custom views with the rich features of KeyboardKit, to create completely custom keyboard extensions. Most of the KeyboardKit features can be used on all major Apple platforms as well.
tvOS 13 and
Although KeyboardKit builds on all platform, some features are unavailable on some platforms.
KeyboardKit can be installed with the Swift Package Manager:
or with CocoaPods:
You can add the library to the main app, the keyboard extension and any other targets that need it.
The online documentation has a getting-started guide that will help you get started with the library.
The online documentation has articles, code examples etc. that let you overview the various parts of the library and understand how they all connect to each other.
The online documentation is currently iOS-specific. To generate documentation for other platforms, open the package in Xcode, select a simulator then run
Note that extensions to native types are not included in this documentation. Future versions of this library will refactor the extensions in a way that makes them appear in the documentation.
KeyboardKit is localized in 50+ keyboard-specific locales (read more):
KeyboardKit comes packed features to help you build amazing and powerful keyboards:
- Actions – KeyboardKit comes with keyboard actions like characters, emojis, actions, custom ones etc.
- Appearances – KeyboardKit comes with an appearance engine that lets you easily style your keyboards.
- Autocomplete – KeyboardKit can present autocomplete suggestions as the user types.
- Callouts – KeyboardKit can show input callouts, as well as long press callouts with secondary actions.
- Emojis – KeyboardKit defines emojis and emoji categories that you can use in your own keyboards.
- Extensions – KeyboardKit provides a bunch of extensions to native types.
- External Keyboards – KeyboardKit lets you detect whether or not an external keyboard is used.
- Feedback – KeyboardKit keyboards can give and haptic feedback feedback as the user types.
- Gestures – KeyboardKit comes with keyboard-specific gestures that you can use in your own keyboards.
- Input Sets – KeyboardKit supports creating
symbolicand custom input sets.
- [Keyboard Layouts][Keyboard-Layouts] – KeyboardKit supports creating keyboard layouts for various devices, locales etc.
- Keyboard Types – KeyboardKit supports keyboard types, like
- Locales– KeyboardKit defines keyboard-specific locales with localized content and assets.
- Previews – KeyboardKit defines a bunch of tools that simplify previewing keyboard views in SwiftUI.
- Proxy – KeyboardKit defines a bunch of extensions to
- RTL – KeyboardKit supports RTL (right-to-left) locales, such as Arabic, Persian, Kurdish etc.
- Styles – KeyboardKit defines a bunch of styles that simplify customizing the look of various components.
- Text Routing – KeyboardKit lets you route text to other destinations than the main app.
- Views – KeyboardKit comes with a bunch of keyboard-specific views, like keyboards, toobars, buttons etc.
KeyboardKit Pro extends KeyboardKit with pro features, such as additional locales, autocomplete engines, more extensions, additional views etc. It lets you create fully localized system keyboards with a single line of code.
This project contains a
Demo folder with two demo apps that lets you try out KeyboardKit.
Demo uses KeyboardKit and lets you type in a light and dark text field. It has three keyboards:
SystemKeyboardto mimic a native English keyboard.
SystemKeyboardand a custom, unicode-based input set.
Customshows you how to easily customize input sets and layouts.
ProDemo uses KeyboardKit Pro and supports 50+ locales, autocomplete etc. It has two keyboards:
System LTRuses a
SystemKeyboardwith all left-to-right locales.
System RTLuses a
SystemKeyboardwith all right-to-left locales.
Just open and run any of 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.
KeyboardKit is trusted and proudly sponsored by the following companies:
Mobile \ Read more \ 06.12
iOS Implementing address autocomplete using SwiftUI and MapKit Customize iOS Simulator for Test Automation My personal (opinionated) iOS Interview Questions...
TLDR explains what makes a fragment of code
TLDR is a plugin for popular IDE Jetbrains, which explains what makes a fragment of code in natural English. TLDR...
CodeScanner – A SwiftUI view to scan QR & barcodes
CodeScanner is a SwiftUI framework that makes it easy to scan codes such as QR codes and barcodes. It provides...
Mobile \ Read more \ 05.12
iOS Create a Basic Shortcut using App Intents Using vulnerable libraries in iOS apps UI/UX Design: The Dynamic Island Build...
Indie App Santa Offers Discounted Indie Apps
It's the most beautiful time of the year... for free and discounted iPhone apps.
Bauly – Compact banners like in iOS 13+
Bauly is a neat little library used to display compact message banners in your app. The design is inspired by stock...