KeyboardKit is a Swift SDK that lets you create fully customizable keyboards with a few lines of code, using SwiftUI.
MIT License
Bot releases are hidden (Show)
KeyboardInputViewController
has a new isContextSyncEnabled
property.KeyboardInputViewController
has a new keyboardTextContext
property.KeyboardInputViewController
has a new viewWillSyncWithContext
function.KeyboardInputViewController
injects its keyboardTextContext
into the environment.KeyboardTextContext
is a new observable class that lets you observe the document text.UITextDocumentProxy
has a new documentContext
property.UITextDocumentProxy
full document context functionality behaves better when there is leading and trailing newlines in the document.UITextDocumentProxy
trimmedDocumentContextBeforeInput
is deprecated.UITextDocumentProxy
trimmedDocumentContextAfterInput
is deprecated.This version improves the full document context behavior for older devices and for playing well with autocomplete.
KeyboardInputViewController
has a new, open isAutocompleteEnabled
property.UITextDocumentProxy
isReadingFullDocumentContext
has been moved from KeyboardKit Pro to the main library.KeyboardInputViewController
will now by default disable autocomplete while a full document context read operation is active.FullDocumentContextConfiguration
sleepSeconds
is renamed to sleepInteval
.FullDocumentContextConfiguration
has adjusted the standard sleepInteval
to 0.04 to behave better on old devices.FullDocumentContextReader
isFullDocumentContextReadOperationInProgress
is renamed to isReadingFullDocumentContext
.UITextDocumentProxy
isFullDocumentContextReadOperationInProgress
is renamed to isReadingFullDocumentContext
.This release starts preparing for the next major version, by deprecating and renaming a lot of things that will change in that version.
Most of the changes only affect functionality that is mostly used internally, but you may have to rename some init and function parameters.
DisabledAutocompleteProvider
is now public
.DisabledCalloutActionProvider
is now public
.InterfaceOrientation
is a new multi-platform version of UIInterfaceOrientation
.KeyboardAppearance
has a new keyboardEdgeInsets
property.KeyboardAppearanceViewModifier
is a new modifier for setting light and dark keyboards.KeyboardAction
has a new isAlphabeticKeyboardTypeAction
property.KeyboardAction
has a new isKeyboardTypeAction
function.KeyboardContext
has new allLtr
and allRtl
properties.KeyboardContext
has a new screenSize
parameter.KeyboardContext
has a new interfaceOrientation
parameter.KeyboardEnabledLabel
is a new view that can display keyboard states.KeyboardEnabledStateInspector
now supports bundle ID wildcards.KeyboardEnabledStateInspector
has a new activeKeyboardBundleIds
property.KeyboardEnabledStateInspector
has a new enabledKeyboardBundleIds
function.KeyboardSettingsLink
is a new view that can link to System Settings.KeyboardSettingsUrlProvider
is a new protocol that can link to System Settings.KeyboardTextView
has a new hasFocus
binding.KeyboardReturnActionMappable
is a new protocol that can map to a primary action type (will be renamed to return in KK7) .RepeatGestureTimer
init is now public
.RepeatGestureTimer
time interval is now mutable.StandardCalloutActionProvider
keyboardContext
is now public
.StandardKeyboardAppearance
keyboardContext
is now public
.StandardKeyboardAppearance
keyboardLayoutConfiguration
is now open
.StandardKeyboardBehavior
keyboardContext
is now public
.StaticKeyboardBehavior
is now open
.StringCasingAnalyzer
is a new protocol that can be used to analyze string casing.StandardAutocompleteProvider
autocompleteSuggestions
is now open
.FullDocumentContextConfiguration
now uses 0.03 as default sleep delay.FullDocumentContextReader
is a new protocol that can be used to read the full document context from any proxy.GestureButtonDefaults
long press delay is reduced to 0.5
seconds.iPhoneKeyboardLayoutProvider
now adds .
to Go
keyboards.iPhoneKeyboardLayoutProvider
now adds @
and .
to e-mail keyboards.KeyboardAction.primary
now applies autocomplete suggestions if it's a system action.KeyboardContext
controller-based initializer is marked as a convenience initializer.KeyboardGestures
now apply the GestureButtonDefaults
long press delay.SystemKeyboard
no longer depends on AnyView
.StandardKeyboardAppearance
now applies insets to system keyboards.StandardKeyboardAppearance
now applies larger font sizes to some system keyboards keys on iPad devices.SystemKeyboardSpaceButtonContent
no longer depends on AnyView
.ActionCallout
now prefers a keyboardContext
to be injected.ActionCallout
context
is renamed to calloutContext
.CaseAdjustable
is renamed to KeyboardCaseAdjustable
.CharacterProvider
is deprecated.EmojiKeyboard
context
is renamed to keyboardContext
.EmojiCategoryKeyboard
context
is renamed to keyboardContext
.EmojiCategoryKeyboardMenu
context
is renamed to keyboardContext
.FeatureToggle.Feature.newButtonGestureEngine
is deprecated.InputCallout
context
is renamed to calloutContext
.LocaleContextMenu
context
is renamed to keyboardContext
.KeyboardAction.newLine
is replaced by KeyboardAction.primary(.newLine)
.KeyboardAction.return
is replaced by KeyboardAction.primary(.return)
.KeyboardAction.standardTapAction
is replaced by KeyboardAction.standardReleaseAction
.KeyboardAction.PrimaryType
is renamed to KeyboardAction.ReturnType
.KeyboardEnabledState
isKeyboardCurrentlyActive
is renamed to isKeyboardActive
.KeyboardEnabledStateInspector
isKeyboardCurrentlyActive
is renamed to isKeyboardActive
.KeyboardCasing
is renamed to KeyboardCase
.KeyboardContext
has redesigned initializers that set fewer properties.KeyboardContext
screenOrientation
is replaced by interfaceOrientation
.KeyboardGrid
is deprecated.KeyboardType
font size is deprecated and moved to StandardKeyboardAppearance
.Sequence+Batched
is deprecated since it was only used in KeyboardGrid
.StringProvider
is deprecated.SpaceCursorDragGestureHandler
context
is renamed to keyboardContext
.StandardAutocompleteSuggestion
has deprecated the initializer with an implicit text name.StandardCalloutActionProvider
context
is renamed to keyboardContext
.StandardKeyboardActionHandler
changeKeyboardTypeAction
is in-comment deprecated.StandardKeyboardAppearance
context
is renamed to keyboardContext
.StandardKeyboardBehavior
context
is renamed to keyboardContext
.StandardSystemKeyboardButtonContent
is deprecated.StaticKeyboardBehavior
context
is renamed to keyboardContext
.SystemKeyboardActionButton
context
is renamed to keyboardContext
.SystemKeyboardActionButtonContent
context
is renamed to keyboardContext
.SystemKeyboardButtonRowItem
context
is renamed to keyboardContext
.SystemKeyboardButtonText
legacy initializer is deprecated.SystemKeyboardSpaceButton
is deprecated.SystemKeyboardSpaceButtonContent
is renamed to SystemKeyboardSpaceContent
.SystemKeyboardSpaceContent
init with a spaceText
parameter is deprecated.UIReturnKeyType
primaryButtonType
is renamed to keyboardActionReturnType
.UIScreen
device extensions are deprecated.View+Frame
is deprecated.View.actionCallout
is renamed to View.keyboardActionCallout
.View.calloutShadow
is renamed to View.keyboardCalloutShadow
.View.inputCallout
is renamed to View.keyboardInputCallout
.EnabledLabel
is deprecated - use the new KeyboardEnabledLabel
instead.KeyboardContext
screen
is deprecated.EnabledLabel
now uses a style.KeyboardEnabledLabel
instead.This release adds 5 new locales, which brings the number of supported locales to 60!
To get locales like Armenian to work, this version starts to break up the layout engine in smaller parts, to make it easier to manage as the number of locales grow. The iPhone and iPad layout providers will be converted to base classes and inherited by locale-specific providers.
Note that a bunch of StandardKeyboardLayoutProvider
things are deprecated in comments only, since the library still has to use them. These will be removed in the next major update.
FullDocumentContextConfiguration
now uses a longer, default delay.FullDocumentContextResult
now contains more information.ProKeyboardLayoutProvider
is a new base class for pro layout providers.ProKeyboardLayoutProvider.Armenian
is the first, new layout provider that uses this new architecture.ProKeyboardLayoutProvider.German
and all German variants now correctly replaces .return
with .newLine
.UITextDocumentProxy
fullDocumentContext
has been adjusted to behave better.UITextDocumentProxy
fullDocumentContext
will now throw an error if it's called while a read operation is in progress.EnglishKeyboardLayoutProvider
is a new, open class that provides English keyboard layouts.InputSetProviderBased
is a new protocol that is used to keep track of types that rely on an input set provider.KeyboardActions
has new character margin actions properties.KeyboardContext
has a new keyboardDictationReplacement
property.KKL10n
has a new join
case, although localiations are missing for most locales.StandardInputSetProvider
keyboardContext
is now public.StandardKeyboardLayoutProvider
can now take a collection of localized layout providers.SystemKeyboard
now applies locale as identifier to force update its rows.StandardKeyboardActionHandler
now ignores autocomplete suggestions when the cursor is at the beginning of a word.SystemKeyboardLayoutProvider
now uses the KeyboardContext
keyboardDictationReplacement
instead of the injected value.SystemKeyboardLayoutProvider
will for now set the KeyboardContext
keyboardDictationReplacement
, if one is provided, to not cause any old code to break.KeyboardLayoutProvider
dictation replacement initializers and properties are deprecated.StandardCalloutActionProvider
providerDictionary
has been renamed to localizedProviders
.StandardInputSetProvider
providerDictionary
has been renamed to localizedProviders
.KeyboardInputTextComponent
has been renamed to KeyboardInputComponent
.StandardKeyboardLayoutProvider
inputSetProvider
is in-comment deprecated.StandardKeyboardLayoutProvider
iPhoneProvider
is in-comment deprecated.StandardKeyboardLayoutProvider
iPadProvider
is in-comment deprecated.StandardKeyboardLayoutProvider
leading and trailing margin action functions are deprecated.SystemKeyboardActionButtonContent
now applies a padding and minimum scale factor to text views.StandardKeyboardLayoutProvider
now requires a keyboard context.KeyboardAction
no longer implements KeyboardRowItem
.KeyboardAction
has a new isSpacer
property.KeyboardButtonStyle
has a new, static spacer
style.SystemKeyboardButtonRowItem
now always apply the new spacer button style to spacer actions.This version adds more emoji features, such as improved unicode names and localized names.
Localizing emojis is a major undertaking and therefore a community effort. Please see the documentation for information on how to help with localizing emojis.
AutocompleteToolbarStyle
has a new optional height
parameter.CharacterProvider
is a new protocol that will let us design better character-based extensions over time.Emoji
has new localizationKey
properties that are used to translate emoji names.Emoji
has new localizedName(for:)
functions that are used to translate emoji names.Emoji
has new unicodeNameOverride
properties, to provide good names and localization keys for the various flags.Emoji
has new matches
functions, that lets you match on emoji unicode and localized names.Emoji
collections have new matching
functions, that lets you search for emojis that match a certain search query.EmojiCharacterAnalyzer
is a new protocol that is implemented by Character
.EmojiStringAnalyzer
is a new protocol that is implemented by String
.KeyboardInputViewController
now only syncs proxy if it changes, which leads to fewer redraws.KeyboardRootView
no longer defines an explicit id.KKL10n
has a new searchEmoji
key that must be localized in all Localizable.strings
files.KKL10n
can now be used to translate custom keys as well, using the same bundle resolve.LocaleContextMenu
is a new view modifier for applying a locale context menu to any view.PrefersAutocompleteResolver
is a new protocol that is implemented by KeyboardType
and UIKeyboardType
.StringProvider
is a new protocol that will let us design better string-based extensions over time.AutocompleteToolbar
now applies the height from its style.Emoji
has better unicode names for all flag emojis.EmojiCategoryTitle
doesn't have a default padding anymore.KeyboardRootView
no longer applies an explicit id.KeyboardRootView
, the keyboard view no longer has to observe the KeyboardContext
.KeyboardRootView
, the full document context correctly updates the view after the async operation completes.KKL10n
hasText
is deprecated, since it produces incorrect results.InputSetProvider
row functions are deprecated.InputSetRow
initializers with implic names are deprecated.View+localeContextMenu
with locales parameter is deprecated.EmojiCategoryKeyboard
no longer allows customizing the keyboard view.This version adds a brand new gesture engine, which aims to make typing feel a lot more like in the native keyboards.
This version also adds new emoji capabilities, such as a unicode id and name, as well as support for skin tone variants (Pro feature). These new capabilities are used by the emoji keyboards, which can now show input callouts and skin tone variants when you type on an emoji keyboard.
Since typing is such an important part of this library, the new gesture engine can be toggled off if you find problems with it:
FeatureToggle.shared.toggleFeature(.newButtonGestureEngine, .off)
Note that the new gesture engine is only available in iOS 14+. Devices running iOS 13 will still get the current gesture engine, even if you toggle on this feature.
Emoji
implements the new ProEmojiInfo
protocol.ProCalloutActionProvider
now returns skin tone variant actions for emojis.ProEmojiInfo
is a new protocol for Pro emoji information.ProEmojiInfo
has hasSkinToneVariants
, neutralSkinToneVariant
, skinToneVariants
and skinToneVariantsActions
properties.ActionCalloutContext.shared
is now public.Emoji
has new unicodeIdentifier
and unicodeName
properties.EmojiKeyboard
and EmojiCategoryKeyboard
now supports keyboard gestures and skin tone callouts.EmojiKeyboard
has a new applyGestures
parameter, that you can set to true to apply standard keyboard gestures.EmojiKeyboard
has a new standardKeyboardActionHandler
property.EmojiKeyboardItem
is a new view for rendering a keyboard item view.GestureButton
is a new view that lets you handle many different gestures with a single button.InputCalloutContext.shared
is now public.InputCalloutContext
has a new, configurable minimumVisibleDuration
property that controls the minimum visibility of the input callout.KeyboardAction
has a new image
property.KeyboardAction
has a new isEmojiAction
property.SpaceCursorDragGestureHandler
is now open to inheritance.EmojiKeyboard
uses smaller emojis for standard iPad in portrait.InputCallout
no longer allows hit testing.KeyboardAction.backspace
now triggers on press
instead of tap
.KeyboardGestures
now has private state to avoid press gesture problems when providing a constant binding.SystemKeyboardButtonRowItem
now avoids applying a negative width.View+KeyboardGestures
now render a plain button that triggers the press, release and tap action on tvOS.KeyboardGestures
now use internal state to avoid problems when passing in a constant binding.LocaleProvider
now wraps Swift 5.7 code in a compile version version check.SystemKeyboardButtonRowItem
now protects itself against getting a negative width.KeyboardAction
.isShift
has been renamed to isShiftAction
.KeyboardAction
.isUppercaseShift
has been renamed to isUppercasedShiftAction
.KeyboardImageButton
has been deprecated and will be removed in KeyboardKit 7.SystemAudio
types have been renamed to AudioFeedback
to make the concept match haptic feedback types.SystemAudio
play
has been renamed to trigger
to make it match the haptic feedback trigger.SystemAudioPlayer
types have been renamed to SystemAudioEngine
to make the concept match other feedback engines.View+KeyboardGestures
no longer need a keyboard context.This version adjusts the KeyboardKit Pro license model.
There are some minor breaking changes in KeyboardKit Pro that should be straightforward to fix.
License
contains new information and capabilities, to enable future license features.ProInputSetProvider
now nests all pro input set providers for a cleaer api.ProCalloutActionProvider
now nests all pro callout action providers for a cleaer api.KeyboardLocale
implements the new LocaleProvider
and LocaleFlagProvider
protocols.Locale
implements the new LocaleProvider
and LocaleFlagProvider
protocols.LocaleProvider
is a new protocol that defines how to resolve locales.LocaleFlagProvider
is a new protocol that defines how to resolve flags for a locale.UITextDocumentProxy
full text content extensions have been tweaked to perform better.6.4.4_bitcode
tag.KeyboardLocale.kurdish_sorani_arabic
uses ckb_IQ
instead of ckb_AR
to get a valid locale identifier.View+LocaleContextMenu
now iterates over the locales without enumerating.UITextDocumentProxy
full text content extensions are now configurable.ActionCalloutStyle.standardFont
can now be set to change the global callout font.KeyboardButtonShadowStyle.standard
can now be set to change the global style.KeyboardColorReader
standard values can now be set to change the global style.