Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/KeyboardKit/KeyboardKit
KeyboardKit is a Swift SDK that lets you create fully customizable keyboards with a few lines of code, using SwiftUI.
https://github.com/KeyboardKit/KeyboardKit
apple emoji ios keyboard keyboard-extension macos swift swiftui tvos visionos watchos
Last synced: 3 months ago
JSON representation
KeyboardKit is a Swift SDK that lets you create fully customizable keyboards with a few lines of code, using SwiftUI.
- Host: GitHub
- URL: https://github.com/KeyboardKit/KeyboardKit
- Owner: KeyboardKit
- License: mit
- Created: 2016-08-19T01:43:45.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-08-09T07:48:42.000Z (3 months ago)
- Last Synced: 2024-08-09T08:01:48.333Z (3 months ago)
- Topics: apple, emoji, ios, keyboard, keyboard-extension, macos, swift, swiftui, tvos, visionos, watchos
- Language: Swift
- Homepage: https://keyboardkit.com
- Size: 71 MB
- Stars: 1,459
- Watchers: 29
- Forks: 221
- Open Issues: 51
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
## About KeyboardKit
KeyboardKit is a SwiftUI SDK that lets you create fully customizable [keyboard extensions][About] with just a few lines of code.
KeyboardKit extends Apple's limited keyboard APIs, extends the text document proxy and input controller with a lot more capabilities, and provides you with additional functionality, services, states and views, to let you build an outstanding, custom keyboard with ease.
KeyboardKit is open-source and completely free to use. It can be extended with [KeyboardKit Pro][Pro], which unlocks a bunch of pro features, like fully localized keyboards, autocomplete, AI-enabling features, and much more.
Keyboard extensions can be used within all other apps on iOS, whever text input is supported. It's the only way for your company, product, or brand to directly interact with other apps on iOS. Don't miss out!
## Installation
KeyboardKit can be installed with the Swift Package Manager:
```
https://github.com/KeyboardKit/KeyboardKit.git
```After installing KeyboardKit, make sure to link it to all targets that need it.
## Getting Started
After installing KeyboardKit, just make your `KeyboardViewController` inherit ``KeyboardInputViewController`` instead of `UIInputViewController`:
```swift
import KeyboardKitclass KeyboardController: KeyboardInputViewController {}
```This gives your controller access to new lifecycle functions like `viewWillSetupKeyboard`, observable state like `state.keyboardContext`, services like `services.actionHandler`, and much more.
If you just want to use the standard `KeyboardView`, which mimics a native iOS keyboard, you don't have to do anything else. KeyboardKit will set up everything for you.
To replace or customize the standard `KeyboardView`, just override `viewWillSetupKeyboard` and call `setup` with a `view` builder:
```swift
class KeyboardViewController: KeyboardInputViewControllerย {override func viewWillSetupKeyboard() {
super.viewWillSetupKeyboard()
setup { [weak self] controller in // <-- Use [weak self] or [unowned self] if you need self here.
KeyboardView(
state: controller.state,
services: controller.services,
buttonContent: { $0.view },
buttonView: { $0.view },
emojiKeyboard: { $0.view },
toolbar: { _ in MyCustomToolbar() }
)
}
}
}
```For more information, please see the [getting started guide][Getting-Started].
## Supported Locales
KeyboardKit supports [68 keyboard-specific locales][Localization]:
๐ฆ๐ฑ ๐ฆ๐ช ๐ฆ๐ฒ ๐ง๐พ ๐ง๐ฌ ๐ฆ๐ฉ ๐ณ๏ธ ๐ญ๐ท ๐จ๐ฟ ๐ฉ๐ฐ
๐ณ๐ฑ ๐ง๐ช ๐บ๐ธ ๐ฌ๐ง ๐บ๐ธ ๐ช๐ช ๐ซ๐ด ๐ต๐ญ ๐ซ๐ฎ ๐ซ๐ท
๐จ๐ฆ ๐ง๐ช ๐จ๐ญ ๐ฌ๐ช ๐ฉ๐ช ๐ฆ๐น ๐จ๐ญ ๐ฌ๐ท ๐บ๐ธ ๐ฎ๐ฑ
๐ญ๐บ ๐ฎ๐ธ ๐ณ๏ธ ๐ฎ๐ฉ ๐ฎ๐ช ๐ฎ๐น ๐ฐ๐ฟ ๐น๐ฏ ๐น๐ฏ ๐น๐ฏ
๐ฑ๐ป ๐ฑ๐น ๐ฒ๐ฐ ๐ฒ๐พ ๐ฒ๐น ๐ฒ๐ณ ๐ณ๏ธ ๐ณ๐ด ๐ณ๐ด ๐ฎ๐ท
๐ต๐ฑ ๐ต๐น ๐ง๐ท ๐ท๐ด ๐ท๐บ ๐ท๐ธ ๐ท๐ธ ๐ธ๐ฐ ๐ธ๐ฎ ๐ช๐ธ
๐ฆ๐ท ๐ฒ๐ฝ ๐ฐ๐ช ๐ธ๐ช ๐น๐ท ๐บ๐ฆ ๐บ๐ฟ ๐ด๓ ง๓ ข๓ ท๓ ฌ๓ ณ๓ ฟKeyboardKit provides a basic keyboard layout with basic callout actions.ย [KeyboardKit Pro][Pro] provides localized layouts, callouts and behaviors for all supported locales.
## Open-Source Features
KeyboardKit comes packed with features to help you build amazing keyboard extensions:
* โจ๏ธ [Essentials][Essentials] - KeyboardKit provides essential utilities, types & views.
* ๐ฅ [Actions][Actions] - KeyboardKit makes it easy to trigger keyboard-related actions.
* ๐ก [Autocomplete][Autocomplete] - KeyboardKit has ways to perform autocomplete.
* ๐ฏ [Callouts][Callouts] - KeyboardKit can show input & secondary action callouts.
* ๐ [Colors][Colors] - KeyboardKit defines keyboard-specific colors.
* ๐ฅ๏ธ [Device][Device] - KeyboardKit has device-specific utilities.
* ๐ [Emojis][Emojis] - KeyboardKit defines emojis, categories, versions, skin tones, etc.
* ๐ [Feedback][Feedback] - KeyboardKit can trigger audio & haptic feedback.
* ๐ [Gestures][Gestures] - KeyboardKit has a customizable keyboard gesture engine.
* ๐ [Host][Host] - KeyboardKit can identify the host application.
* ๐ผ๏ธ [Images][Images] - KeyboardKit defines keyboard-specific images.
* ๐ฃ [Layout][Layout] - KeyboardKit has customizable input sets & keyboard layouts.
* ๐ [Localization][Localization] - KeyboardKit supports **68 locales**.
* ๐บ๏ธ [Navigation][Navigation] - KeyboardKit lets you open urls and apps from the keyboard.
* ๐ [Previews][Previews] - KeyboardKit has extensive keyboard preview support.
* โก๏ธ [Proxy][Proxy] - KeyboardKit extends the text document proxy with a lot more capabilities.
* โ๏ธ [Settings][Settings] - KeyboardKit has tools for in-app settings & System Settings.
* ๐ฉบ [Status][Status] - KeyboardKit can detect if a keyboard is enabled, has full access, etc.
* ๐จ [Styling][Styling] - KeyboardKit lets you style your keyboards to great extent.## Pro Features
You can upgrade to [KeyboardKit Pro][Pro] to unlock Pro features.
* โจ๏ธ [Essentials][Essentials] - KeyboardKit Pro unlocks more essential tools, keyboard previews, etc.
* ๐ค [AI][AI] - KeyboardKit Pro unlocks features that are needed for AI.
* ๐ฑ [App][App] - KeyboardKit Pro unlocks app-specific screens & views.
* ๐ก [Autocomplete][Autocomplete] - KeyboardKit Pro unlocks on-device & remote autocomplete.
* ๐ฏ [Callouts][Callouts] - KeyboardKit Pro unlocks localized callouts for all **68** locales.
* ๐ค [Dictation][Dictation] - KeyboardKit Pro can perform dictation from the keyboard.
* ๐ [Emojis][Emojis] - KeyboardKit Pro unlocks a powerful emoji keyboard.
* โจ๏ธ [External][External] - KeyboardKit Pro can detect if an external keyboard is connected.
* ๐ [Feedback][Feedback] - KeyboardKit Pro unlocks tools for toogling feedback on & off.
* ๐ [Host][Host] - KeyboardKit Pro can identify specific host applications.
* ๐ฃ [Layout][Layout] - KeyboardKit Pro unlocks localized layouts for all **68** locales.
* ๐ [Localization][Localization] - KeyboardKit Pro unlocks **68** locale-specific services and keyboard views.
* ๐ [Previews][Previews] - KeyboardKit Pro unlocks keyboard and theme previews.
* โก๏ธ [Proxy][Proxy] - KeyboardKit Pro unlocks ways for `UITextDocumentProxy` to read the full document.
* ๐ [Text][Text-Input] - KeyboardKit Pro unlocks tools to let you type within the keyboard.
* ๐ญ [Themes][Themes] - KeyboardKit Pro unlocks a theme engine with many pre-defined themes.## Documentation
The [online documentation][Documentation] has more information, articles, code examples, etc.
## Demo App
The demo app shows how to display keyboard state, link to system settings, etc.
The demo app has two demo keyboards:
* `Keyboard` uses KeyboardKit and a customized `KeyboardView`.
* `KeyboardPro` uses KeyboardKit Pro and enables all locales, autocomplete, themes, etc.Just open and run the demo app in the `Demo` folder, then enable the keyboards under System Settings. Note that you need to enable full access for some features to work.
## KeyboardKit App
If you want to try KeyboardKit Pro without having to write any code or build the demo app from Xcode, there is a [KeyboardKit app][App] in the App Store, that lets you try out many pro features.
## Support This Project
KeyboardKit is open-source and completely free, but you can support the project by becoming a [GitHub Sponsor][Sponsors], upgrading to [KeyboardKit Pro][Pro] or [get in touch][Email] for freelance work, paid support etc.
## Contact
Feel free to reach out if you have questions or if you want to contribute in any way:
* Website: [keyboardkit.com][Website]
* Mastodon: [@[email protected]][Mastodon]
* Twitter: [@getkeyboardkit][Twitter]
* E-mail: [[email protected]][Email]## License
KeyboardKit is available under the MIT license. See the [LICENSE][License] file for more info.
[Email]: mailto:[email protected]
[Website]: https://keyboardkit.com
[Twitter]: http://twitter.com/getkeyboardkit
[Mastodon]: https://techhub.social/@keyboardkit
[Sponsors]: https://github.com/sponsors/danielsaidi[About]: https://keyboardkit.com/about
[KeyboardKit]: https://github.com/KeyboardKit/KeyboardKit
[Pro]: https://github.com/KeyboardKit/KeyboardKitPro
[Gumroad]: https://kankoda.gumroad.com
[App]: https://keyboardkit.com/app
[License]: https://github.com/KeyboardKit/KeyboardKit/blob/master/LICENSE[Documentation]: https://keyboardkit.github.io/KeyboardKit/
[Getting-Started]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/getting-started
[Essentials]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/essentials[Actions]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/actions-article
[AI]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/ai-article
[App]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/app-article
[Autocomplete]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/autocomplete-article
[Buttons]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/buttons-article
[Callouts]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/callouts-article
[Colors]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/colors-article
[Device]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/device-article
[Dictation]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/dictation-article
[Emojis]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/emojis-article
[External]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/external-keyboards-article
[Feedback]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/feedback-article
[Gestures]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/gestures-article
[Host]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/host-article
[Images]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/images-article
[Layout]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/layout-article
[Localization]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/localization-article
[Navigation]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/navigation-article
[Previews]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/previews-article
[Proxy]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/proxy-article
[Settings]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/settings-article
[Status]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/status-article
[Styling]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/styling-article
[Text-Input]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/text-input-article
[Themes]: https://keyboardkit.github.io/KeyboardKit/documentation/keyboardkit/themes-article