KeyboardKit is a Swift library that helps you create custom keyboard extensions for iOS and ipadOS. It provides you with a rich set of keyboard-specific tools and actions, supports haptic and audio feedback and lets you create keyboards with characters, emojis, images, custom actions etc.
If you're new to iOS keyboard extensions, this great guide can help you get started. You can also have a look at the demo app for examples on how to use this library.
https://github.com/danielsaidi/KeyboardKit.git
target 'MyApp' do
pod 'KeyboardKit'
end
target 'MyKeyboard' do
pod 'KeyboardKit'
endAfter adding KeyboardKit to your project, make your extension inherit KeyboardInputViewController instead of UIInputViewController. It provides you with many tools that helps you build custom keyboard extension.
KeyboardKit supports both UIKit and SwiftUI, so you can pick the option that suits your needs best. SwiftUI support is currently kept in a separate library, but will be the main focus going forward.
Since version 2.7.0, KeyboardKit provides new tools that help you build SwiftUI-based keyboards. SwiftUI will be the main focus going forward, with the aim to improve SwiftUI support in version 3.x and move it to the main repo in 4.0. When this happens, KeyboardKit will target iOS 13 and up.
Due to a Swift toolchain bug, SwiftUI support must be kept in a separate library. Until the bug is fixed, you must add both KeyboardKit and KeyboardKitSwiftUI to your project, if you want to use KeyboardKit with SwiftUI.
KeyboardKit supports many different keyboard actions, like character inputs, emoji inputs, backspace, newline, space, image etc. You can even create your own, custom actions.
KeyboardKit supports many different keyboard types, like alphabetic, numeric, symbolic, emoji etc. You can even create your own, custom keyboard types.
KeyboardKit supports autocomplete and can present autocomplete suggestions to users as they type.
KeyboardKit supports haptic feedback and can give users haptic feedback as they type.
KeyboardKit supports audio feedback and can give users audio feedback as they type.
KeyboardKit comes with many keyboard-specific extensions. Check out the demo apps and source code for examples and more information.
KeyboardKit comes with many views and components that can be composed into custom UIKit and SwiftUI-based keyboards, e.g. button, rows, toolbars etc.
This repository contains two demo apps that demonstrate different keyboard types, like alphabetical (lower/uppercased and caps locked), numerical, symbols, emojis and images.
KeyboardKitDemoKeyboard uses UIKit while KeyboardKitDemoKeyboard_SwiftUI uses SwiftUI.
Note that audio feedback, haptic feedback and image actions require full access. Also, the image switcher is only shown on notch devices.
To run the demo app, open and run the KeyboardKit.xcodeproj project then enable the keyboards under system settings. Don't forget to enable full access.
Feel free to reach out if you have questions or if you want to contribute in any way:
- E-mail: daniel.saidi@gmail.com
- Twitter: @danielsaidi
- Web site: danielsaidi.com
KeyboardKit is proudly supported by:
Your company can support KeyboardKit by either sponsoring the project on GitHub Sponsors or by paying for consultation. I'ld be happy to help you out with your keyboard needs.
KeyboardKit is available under the MIT license. See LICENSE file for more info.



