KeyboardKit / KeyboardKitPro

KeyboardKit Pro helps you create custom keyboards for iOS and iPadOS.
https://keyboardkit.com
Other
110 stars 8 forks source link

Unable to disable autocorrection #9

Closed anonys closed 9 months ago

anonys commented 10 months ago

Hey!

I have been trying to disable autocorrection but without any luck although I've set autocorrectionDisabled(true) as seen below - unless I am doing it wrongly.

SystemKeyboard(
                    state: controller.state,
                    services: controller.services,
                    buttonContent: { $0.view },
                    buttonView: { $0.view },
                    emojiKeyboard: { _ in EmojiKeyboard(
                   state: state,
                    services: services)
                    },
                    toolbar: { _ in }

                )
                .autocorrectionDisabled(true)
danielsaidi commented 10 months ago

Hi @anonys

That property is SwiftUI-specific and will currently not affect KeyboardKit.

Adding support to disable autocorrect is however in the roadmap: https://github.com/KeyboardKit/KeyboardKit/issues/667

However, this feature will be implemented first, which will let you solve this in another way: https://github.com/KeyboardKit/KeyboardKit/issues/666

It should then also be possible to use @Environment(\.autocorrectionDisabled) to let any view disable autocorrect.

danielsaidi commented 9 months ago

This is supported in 8.1 (with a 8.1.1 bug fix).