Skip to content

KeyboardKit is a Swift library that helps you build custom keyboard extensions.

License

Notifications You must be signed in to change notification settings

xevifar/KeyboardKit

 
 

Repository files navigation

KeyboardKit Logo

Version Swift 5.6 MIT License Twitter: @@getkeyboardkit Mastodon: @keyboardkit@techhub.social

About KeyboardKit

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.

Supported Platforms

KeyboardKit supports iOS 14, macOS 11, tvOS 14 and watchOS 7.

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 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 Product/Build Documentation.

Localization

KeyboardKit is localized in 60 keyboard-specific locales (read more):

🇦🇱 🇦🇪 🇦🇲 🇧🇾 🇧🇬 🇦🇩 🏳️ 🇭🇷 🇨🇿 🇩🇰

🇳🇱 🇧🇪 🇺🇸 🇬🇧 🇺🇸 🇪🇪 🇫🇴 🇵🇭 🇫🇮 🇫🇷

🇧🇪 🇨🇭 🇬🇪 🇩🇪 🇦🇹 🇨🇭 🇬🇷 🇺🇸 🇮🇱 🇭🇺

🇮🇸 🇮🇩 🇮🇪 🇮🇹 🇹🇯 🇹🇯 🇹🇯 🇱🇻 🇱🇹 🇲🇰

🇲🇾 🇲🇹 🇲🇳 🇳🇴 🇮🇷 🇵🇱 🇵🇹 🇧🇷 🇷🇴 🇷🇺

🇷🇸 🇷🇸 🇸🇰 🇸🇮 🇪🇸 🇰🇪 🇸🇪 🇹🇷 🇺🇦 🇺🇿

Features

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.
  • 🎨 Appearance - KeyboardKit comes with an appearance engine that lets you easily style your keyboards.
  • 💡 Autocomplete - KeyboardKit can perform autocomplete and present suggestions as the user types.
  • 🗯 Callouts - KeyboardKit can show input callouts, as well as long press callouts with secondary actions.
  • 🎤 [Dictation][Dictation] - (PREVIEW) KeyboardKit can trigger dictation from the keyboard extension.
  • 😊 Emojis - KeyboardKit defines emojis and emoji categories that you can use in your own keyboards.
  • ⌨️ 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 - KeyboardKit supports creating alphabetic, numeric and symbolic and custom input sets.
  • 🔣 Layout - KeyboardKit supports creating keyboard layouts for various devices, locales etc.
  • ⌨️ Keyboard - KeyboardKit supports different keyboard types, can inspect a keyboard's state etc.
  • 🌐 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 UITextDocumentProxy.
  • 🚏 Routing - KeyboardKit lets you route text to other destinations than the main app.
  • ⬅️ RTL - KeyboardKit supports RTL (right-to-left) locales, such as Arabic, Persian, Kurdish etc.
  • ⚙️ Settings - KeyboardKit has tools for accessing and linking to an app's keyboard settings.

KeyboardKit Pro

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.

KeyboardKit Pro requires a commercial license. Licenses can be purchased from the website or from Gumroad.

Demo Applications

This project has a Demo folder with a demo apps that lets you try out different KeyboardKit features.

The demo app has 5 keyboard extensions:

  • English has a SystemKeyboard with the standard, English locale.
  • Unicode has a SystemKeyboard with unicode-based input keys.
  • Custom has a SystemKeyboard with custom keys, layout and appearance.
  • Pro uses KeyboardKit Pro and has a SystemKeyboard with all LRT locales.
  • ProRtl uses KeyboardKit Pro and has a SystemKeyboard with all RTL locales.

Just open and run the demo app, 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.

Support

KeyboardKit is trusted and proudly sponsored by the following companies:

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

KeyboardKit is open-source and completely free, but you can sponsor this project on GitHub Sponsors, upgrade to KeyboardKit Pro or get in touch for paid support.

Contact

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

License

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

About

KeyboardKit is a Swift library that helps you build custom keyboard extensions.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 99.5%
  • Other 0.5%