Thanks to visit codestin.com
Credit goes to github.com

Skip to content

KeyboardKit helps you create custom keyboards with Swift and SwiftUI.

License

Notifications You must be signed in to change notification settings

zerovik-tech/KeyboardKit-AI

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3,262 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

KeyboardKit Logo

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

About KeyboardKit

KeyboardKit is a SwiftUI SDK that lets you create fully customizable keyboard extensions with a few lines of code.

KeyboardKit extends Apple's limited keyboard APIs, extends the input controller and proxy with more capabilities, and provides you with additional functionality, states and views, to let you build an outstanding, custom keyboards.

KeyboardKit is open-source and completely free. It can be extended with KeyboardKit Pro to unlock Pro features, like localized keyboards, autocomplete & autocorrect, AI support, an emoji keyboard, themes, dictation, and more.

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

To use KeyboardKit in a keyboard extension, just inherit the KeyboardKit KeyboardInputViewController instead of UIInputViewController:

import KeyboardKit

class 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 an English keyboard for you.

To replace or customize the standard KeyboardView, just override viewWillSetupKeyboard and call setup with the view you want to use:

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.

Supported Locales

KeyboardKit supports 68 keyboard-specific locales:

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

KeyboardKit only includes built-in support for English, whileย KeyboardKit Pro unlocks localized keyboards, layouts, callouts and behaviors for all supported locales.

Open-Source Features

KeyboardKit comes packed with free, open-source features to help you build amazing custom keyboards:

  • โŒจ๏ธ Essentials - Essential utilities, models, services & views.
  • ๐Ÿ’ฅ Actions - Trigger & handle keyboard-related actions.
  • ๐Ÿ’ก Autocomplete - Perform autocomplete as the user types.
  • ๐Ÿ—ฏ Callouts - Show input & secondary action callouts as the user types.
  • ๐Ÿ–ฅ๏ธ Device - Identify the device type, device capabilities, etc.
  • ๐Ÿ˜€ Emojis - Emojis, categories, versions, skin tones, etc.
  • ๐Ÿ”‰ Feedback - Trigger audio & haptic feedback with ease.
  • ๐Ÿ‘† Gestures - Handle a rich set of gestures on any key.
  • ๐Ÿ  Host - Easily can identify the host application.
  • ๐Ÿ”ฃ Layout - Easily define and customize the keyboard layout.
  • ๐ŸŒ Localization - Localize your keyboard in all supported locales.
  • ๐Ÿ—บ๏ธ Navigation - Open urls and other apps from the keyboard.
  • ๐Ÿ‘ Previews - Extensive keyboard preview support.
  • โžก๏ธ Proxy - Extend the text document proxy with a lot more capabilities.
  • โš™๏ธ Settings - Easily provide in-app settings & link to System Settings.
  • ๐Ÿฉบ Status - Detect if a keyboard is enabled, has full access, etc.
  • ๐ŸŽจ Styling - Style your keyboard to great extent.

Pro Features

KeyboardKit Pro extends KeyboardKit with Pro features:

  • โŒจ๏ธ Essentials - Unlock more essential tools, keyboard previews, etc.
  • ๐Ÿค– AI - Unlock features that are needed for AI.
  • ๐Ÿ“ฑ App - Unlock app-specific screens & views.
  • ๐Ÿ’ก Autocomplete - Unlock on-device & remote autocomplete for many locales.
  • ๐Ÿ—ฏ Callouts - Unlock localized callouts for all locales.
  • ๐ŸŽค Dictation - Make your keyboard perform dictation via the main app.
  • ๐Ÿ˜€ Emojis - Unlock a powerful emoji keyboard.
  • โŒจ๏ธ External - Detect if an external keyboard is connected.
  • ๐Ÿ  Host - Easily identify and open specific host applications.
  • ๐Ÿ”ฃ Layout - Unlock localized layouts for all locales.
  • ๐ŸŒ Localization - Unlock locale-specific services & views.
  • ๐Ÿ‘ Previews - Unlock keyboard & theme previews.
  • โžก๏ธ Proxy - Unlock ways for UITextDocumentProxy to read the full document.
  • ๐Ÿ“ Text - Unlock tools to let users type within the keyboard.
  • ๐Ÿญ Themes - Unlock a theme engine with many pre-defined themes.

Documentation

The online documentation has more information, articles, code examples, etc.

Demo App

The demo app shows you how to customize the keyboard, show keyboard state, provide in-app settings in the main app, link to system settings, apply custom styles, etc.

The app has two keyboards - a Keyboard that uses KeyboardKit and a KeyboardPro that uses KeyboardKit Pro.

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, like haptic feedback.

KeyboardKit App

If you want to try KeyboardKit without having to write any code or build the demo app from Xcode, the KeyboardKit app lets you try out many features by just downloading it from the App Store.

Support This Project

KeyboardKit is open-source and completely free, but you can support the project by becoming a GitHub Sponsor, upgrading to KeyboardKit Pro or get in touch 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:

License

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

About

KeyboardKit helps you create custom keyboards with Swift and SwiftUI.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 99.8%
  • Ruby 0.2%