Swiftpack.co - KeyboardKit/KeyboardKit as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by KeyboardKit.
KeyboardKit/KeyboardKit 6.0.0
KeyboardKit is a Swift library that helps you create custom keyboard extensions for iOS and ipadOS.
โญ๏ธ 745
๐Ÿ•“ 12 weeks ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/KeyboardKit/KeyboardKit.git", from: "6.0.0")

KeyboardKit

Version Platform Swift 5.5 MIT License Twitter: @getkeyboardkit

About KeyboardKit

KeyboardKit helps you build custom keyboard extensions 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:

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 apps for inspiration.

Supported Platforms

KeyboardKit supports the following platforms:

  • iOS 13.0
  • macOS 11.0
  • tvOS 13.0
  • watchOS 6.0

Although KeyboardKit builds on all platform, some features are unavailable on some platforms.

Installation

The best way to install KeyboardKit 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 need it.

Getting started

Once KeyboardKit is added to your project, you can start using it in your application and keyboard extension.

Read more here

Documentation

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.

๐Ÿ‡ธ๐Ÿ‡ช Localization

KeyboardKit is localized in 50 keyboard-specific locales:

๐Ÿ‡บ๐Ÿ‡ธ ๐Ÿ‡ฆ๐Ÿ‡ฑ ๐Ÿ‡ฆ๐Ÿ‡ช ๐Ÿ‡ง๐Ÿ‡พ ๐Ÿ‡ง๐Ÿ‡ฌ ๐Ÿ‡ฆ๐Ÿ‡ฉ ๐Ÿ‡ญ๐Ÿ‡ท ๐Ÿ‡จ๐Ÿ‡ฟ ๐Ÿ‡ฉ๐Ÿ‡ฐ ๐Ÿ‡ณ๐Ÿ‡ฑ
๐Ÿ‡ง๐Ÿ‡ช ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿ‡บ๐Ÿ‡ธ ๐Ÿ‡ช๐Ÿ‡ช ๐Ÿ‡ซ๐Ÿ‡ด ๐Ÿ‡ต๐Ÿ‡ญ ๐Ÿ‡ซ๐Ÿ‡ฎ ๐Ÿ‡ซ๐Ÿ‡ท ๐Ÿ‡ง๐Ÿ‡ช ๐Ÿ‡จ๐Ÿ‡ญ
๐Ÿ‡ฌ๐Ÿ‡ช ๐Ÿ‡ฉ๐Ÿ‡ช ๐Ÿ‡ฆ๐Ÿ‡น ๐Ÿ‡จ๐Ÿ‡ญ ๐Ÿ‡ฌ๐Ÿ‡ท ๐Ÿ‡ญ๐Ÿ‡บ ๐Ÿ‡ฎ๐Ÿ‡ธ ๐Ÿ‡ฎ๐Ÿ‡ช ๐Ÿ‡ฎ๐Ÿ‡น ๐Ÿ‡น๐Ÿ‡ฏ
๐Ÿ‡ฑ๐Ÿ‡ป ๐Ÿ‡ฑ๐Ÿ‡น ๐Ÿ‡ฒ๐Ÿ‡ฐ ๐Ÿ‡ฒ๐Ÿ‡น ๐Ÿ‡ฒ๐Ÿ‡ณ ๐Ÿ‡ณ๐Ÿ‡ด ๐Ÿ‡ฎ๐Ÿ‡ท ๐Ÿ‡ต๐Ÿ‡ฑ ๐Ÿ‡ต๐Ÿ‡น ๐Ÿ‡ง๐Ÿ‡ท
๐Ÿ‡ท๐Ÿ‡ด ๐Ÿ‡ท๐Ÿ‡บ ๐Ÿ‡ท๐Ÿ‡ธ ๐Ÿ‡ท๐Ÿ‡ธ ๐Ÿ‡ธ๐Ÿ‡ฐ ๐Ÿ‡ธ๐Ÿ‡ฎ ๐Ÿ‡ช๐Ÿ‡ธ ๐Ÿ‡ธ๐Ÿ‡ช ๐Ÿ‡น๐Ÿ‡ท ๐Ÿ‡บ๐Ÿ‡ฆ

Read more here

Features

KeyboardKit comes packed with features. Checkout the list below, and have a look at the documentation, demo apps and source code for even more information and examples.

๐Ÿ’ฅ Actions

KeyboardKit comes with many keyboard-specific actions, like character inputs, emojis, backspace, space, newline, image etc. You can even create your own actions.

Read more here

๐ŸŽจ Appearance

KeyboardKit comes with an appearance engine that lets you easily style your keyboards.

Read more here

๐Ÿ”Š Audio

KeyboardKit defines system audio types and ways to play them.

Read more here

๐Ÿ’กAutocomplete

KeyboardKit can present autocomplete suggestions as users type.

Read more here

๐Ÿ—ฏ Callouts

KeyboardKit lets you show input callouts as users type, as well as action callouts with alternate actions for the currently pressed key.

Read more here

๐Ÿ˜Š Emojis

KeyboardKit defines emojis and emoji categories that you can use in your own keyboards.

Read more here

๐Ÿงฉ Extensions

KeyboardKit provides a bunch of extensions to native types.

Read more here

โŒจ๏ธ External Keyboards

KeyboardKit lets you detect whether or not an external keyboard is used.

Read more here

๐Ÿ‘‹ Feedback

KeyboardKit keyboards can give audio and haptic feedback as users type.

Read more about audio feedback and haptic feedback.

๐Ÿ‘† Gestures

KeyboardKit comes with keyboard-specific gestures that you can use in your own keyboards.

Read more here

๐Ÿ‘‹ Haptics

KeyboardKit defines haptic feedback types and ways to trigger them.

Read more here

๐Ÿ”ค Input Sets

KeyboardKit comes with an input set engine that make it easy to create alphabetic, numeric and symbolic keyboards in different languages.

Read more here

โŒจ๏ธ Keyboard Layouts

KeyboardKit comes with a layout engine that makes it easy to create specific keyboard layouts for various devices, orientations and locales.

Read more here

๐Ÿ’ฑ Keyboard Types

KeyboardKit comes with many different keyboard types, like alphabetic, numeric, symbolic, emoji etc. You can even create your own types.

Read more here

๐ŸŒ Locales

KeyboardKit defines keyboard-specific locales and provides localized content for the supported locales.

Read more here

๐Ÿ‘ Previews

KeyboardKit defines a bunch of preview-specific types that simplify previewing keyboard views in SwiftUI.

Read more here

โžก๏ธ Proxy

KeyboardKit defines a bunch of extensions to UITextDocumentProxy and ways to route text to other sources.

Read more here

โฌ…๏ธ RTL

KeyboardKit supports RTL (right-to-left) locales, but your extension need to be configured to support it.

Read more here

๐ŸŽจ Styles

KeyboardKit defines a bunch of styles that simplify customizing the look of various keyboard components.

Read more here

๐Ÿ–ผ Views

KeyboardKit comes with a bunch of keyboard-specific views, like keyboards, toobars, buttons etc

Read more here

KeyboardKit Pro

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.

Read more here

Demo Applications

This repository contains a Demo folder with two demo apps that lets you try out KeyboardKit and KeyboardKit Pro:

  • The standard demo has a system keyboard that mimics an English keyboard and a unicode-based keyboard.
  • The pro demo has a system keyboard with support for all keyboard locales and an RTL variant as well.

To run the demo apps, open and run the projects, then enable the keyboards under system settings. Full access is required forfeatures like audio and haptic feedback.

Contact

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

Sponsors and Clients

This project is proudly sponsored by the following companies:

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

KeyboardKit is free, but please consider sponsoring the project if you find it useful. You can support KeyboardKit through GitHub Sponsors, by signing up for a Pro license, paying for support, donations etc.

License

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

GitHub

link
Stars: 746
Last commit: 3 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

12 weeks ago

This version makes the library build on more platforms and removes old, deprecated code.

๐Ÿ“บ Platform support

  • KeyboardKit now supports iOS, iPadOS, macOS, tvOS and watchOS.

โœจ New Features

  • ActionCalloutContext has a new, static shared property.
  • ActionCalloutContext has a new verticalOffset that can be used to move the callout up and down.
  • AudioFeedbackConfiguration is now mutable.
  • HapticFeedbackConfiguration is now mutable.
  • InputCalloutContext has a new, static shared property.
  • KeyboardInputViewController has a new didMoveToParent property, which is used to avoid calling needsInputModeSwitchKey when it generates a warning.

๐Ÿ’ก Behavior changes

  • Autocomplete now only applies autocorrections for pure space actions and not character actions with a single space.
  • ActionCallout uses the new ActionCalloutContext verticalOffset to offset the callout bubble.
  • ActionCalloutContext applies a vertical offset to iPad devices, and adjust the demo toolbar to be 50 on iPad as well.
  • StandardKeyboardBehavior now has a 0.5 double tap threshold instead of 0.2, and also handles caps lock better.
  • StandardKeyboardFeedbackHandler now triggers the haptic feedback for long press on space, not the SpaceCursorDragGestureHandler.
  • SystemKeyboard initializers now use nil as default value for the controller and width, to avoid Swift errors in binary framework builds.

๐Ÿ› Bug fixes

  • UITextDocumentProxy isCursorAtNewSentenceWithSpace has been adjusted to handle non-empty space content.

๐Ÿ’ฅ Breaking changes

  • All previously deprecated code has been removed.

  • ActionCalloutContext verticalOffset has been moved to ActionCalloutStyle.

  • Bundle isExtension has been made internal.

  • Color.standardButtonBackgroundColor(for:) has been renamed to standardButtonBackground(for:).

  • Color.standardButtonForegroundColor(for:) has been renamed to standardButtonForeground(for:).

  • Color.standardButtonShadowColor(for:) has been renamed to standardButtonShadow(for:).

  • Color.standardDarkButtonBackgroundColor(for:) has been renamed to standardDarkButtonBackground(for:).

  • Color.standardDarkButtonForegroundColor(for:) has been renamed to standardDarkButtonForeground(for:).

  • KeyboardAction isKeyboardType has been removed.

  • KeyboardAction isSpace has been removed.

  • KeyboardAction standardTextDocumentProxyInputAction has been merged with standardTextDocumentProxyAction.

  • KeyboardAppearance systemKeyboardButtonStyle(for:) has been renamed to buttonStyle(for:).

  • KeyboardFeedbackHandler no longer has any action provider-based logic and no typealiases.

  • KeyboardInputViewController needsInputModeSwitchKeyOverride has been removed.

  • StandardKeyboardActionHandler GestureAction has been removed.

  • StandardKeyboardFeedbackHandler triggerFeedbackForLongPressOnSpaceDragGesture has been removed.

  • StandardKeyboardFeedbackHandler shouldTriggerFeedback has been moved to StandardKeyboardActionHandler.

  • SystemKeyboardButtonStyle has been renamed to KeyboardButtonStyle.

  • SystemKeyboardButtonBorderStyle has been renamed to KeyboardButtonBorderStyle.

  • SystemKeyboardButtonShadowStyle has been renamed to KeyboardButtonShadowStyle.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics