Git Product home page Git Product logo

keyboardkitpro's Issues

User-Specific Dictionary Support Guidance

I am trying to implement support user local dictionary support. I want to learn some words that user inputed or he reverted after autocorrection. My first approach was is inherit class LocalAutocompleteProvider. In this case the suggestion quality is dramatically makes worse. I also tried to use func learnWord(_ word: String) but it looks like doesn't affect it. Could you follow me up how to use pro version of autocomplete provider and enrich his logic? My last approach based on using custom KeyboardActionHandler but it is not fit all my intents.

I am in the process of incorporating a feature for user-specific dictionary support. The aim is to keep comprehend words inputted by the user, including those that were reverted following autocorrection. Initially, I attempted to use inheritance with the LocalAutocompleteProvider class. However, this approach resulted in a significant degradation in suggestion quality. Additionally, I attempted to utilize the function 'learnWord(_ word: String)', but it did not seem to have any discernible impact.

Could you possibly provide guidance on the use of the pro version of the autocomplete provider, particularly in terms of enhancing its logic? My most recent attempt involved using a custom KeyboardActionHandler, but this method did not fully accommodate my requirements. Any assistance you could provide would be greatly appreciated.

final class CustomAutocompleteProvider: LocalAutocompleteProvider {}

final class KeyboardViewController: KeyboardInputViewController {

    override func viewWillSetupKeyboard() {
        super.viewWillSetupKeyboard()

        do {
            try setupPro(
                withLicenseKey: "[Key]",
                view: { controller in KeyboardView(controller: controller) },
                licenseConfiguration: setupKeyboardWithLicense
            )
        } catch {
            os_log("license error \(error)")
        }
    }

    func setupKeyboardWithLicense(_ license: License) {
        autocompleteProvider = try! CustomAutocompleteProvider()
    }
}

Feature Request: Ability to Disable Auto-correction While Keeping Auto-suggestions

Hello, I'm currently using KeyboardKitPro for a project and have come across a limitation that I'd like to discuss. I want to disable the auto-correction feature while keeping the auto-suggestions feature active.

Current Behavior:
When I set the isAutocorrectionEnabled flag to false, it deactivates not only auto-correction but also auto-suggestions.

Desired Behavior:
I'd like to have the ability to disable auto-correction independently of auto-suggestions. Specifically, when I tap the space bar after typing a word, I'd like the word not to be automatically corrected while still being able to see auto-suggestion options.

Use Case:
This feature would be beneficial for users who want to type freely without being auto-corrected, but who still find value in the auto-suggestions provided by the keyboard.

I understand this might require a significant change, and I appreciate your consideration of this feature request.

Thank you!

fullDocumentContext table scan issue

Issue Description

When the cursor is outside a table, the text inside the table is not recognized. I created a table in notes:

|----------|----------|
| The report provides new estimates of the chances of crossing the global warming level of 1.5°C in the next decades, and | |
| The report states that without immediate, rapid, and large-scale reductions in greenhouse gas emissions, it will be impossible to limit global warming to 1.5°C or even 2°C.finds that unlessr
The report says that without immediate and large reductions in greenhouse gas emissions, it will be impossible to limit global warming to 1.5°C or even 2°C. there are immediate, rapid and large-scale reductions in greenhouse gas emissions, limiting warming to close to 1.5°C or even 2°C will be beyond reach. | |

Steps to Reproduce

  1. Open the document containing a table with text inside it.
  2. Place the cursor outside the table.
  3. Try to call fullDocumentContext.

Actual Result

When trying to us, the API indicating that there is no text.

Expected Result

The system should recognize the text inside the table regardless of the cursor's position.

Environment

KeyboardKitPro 7.5.0

Hide emoji buttons on keyboard

Hello, the Emoji page we purchased in the Basic version is blank. How can I hide the Emoji button on the keyboard?

I referred to the code for inserting language switching in DemoLayoutProvider in the Demo and used the itemRows.remove(.emoji) method, but .emjoi also needs to enter a parameter, and I don't understand how to use it.

Appstore upload issue: ITMS-90683 issue: NSSpeechRecognitionUsageDescription

I was unable to upload to Appstore my application with new version of KeyboardKitPro.

The affected versions: 7.4.1 and 7.5.0
No affected versions: 7.1.3 and 7.2.2

You can’t upload the application to Appstore/Testflight, I get a refusal with the following Appstore message:

We identified one or more issues with a recent delivery for your app, [App Name]. Please correct the following issues, then upload again.

ITMS-90683: Missing purpose string in Info.plist - Your app's code references one or more APIs that access sensitive user data, or the app has one or more entitlements that permit such access. The Info.plist file for the "[app name]" bundle should contain a NSSpeechRecognitionUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. For details, visit: https://developer.apple.com/documentation/uikit/protecting_the_user_s_privacy/requesting_access_to_protected_resources.

I am not using speech recognition in my app and not want to add to declare it.

Keyboard casing issue `uppercased` acts like `capsLocked` in text proxies

I am trying to add additional text fields to a custom keyboard for things like a search bar but am running into an issue with casing. The search text field defaults to uppercased but it capitalizes all the letters like capsLocked instead of just the first. The ordinary double-tap capsLocked works fine and so does the lowerCased. This issue only persists in added text proxies so I believe that is where it lies. I've attached a video below.

Simulator.Screen.Recording.-.iPhone.7.Plus.-.2021-07-09.at.19.55.40.mp4

Looking in KeyboardCasing where the keyboard cases are defined I see the following comment:
".uppercased should conform to the text proxy's autocapitalization type."
I think the issue might be here, but I'm not sure how exactly to access the text proxy's autocapitalization type or how to set/override it. For reference, I am using the text proxy from: https://gist.github.com/wearhere/f46ab9d837acaeaabfa86a813c44ad25.

Unable to disable autocorrection

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)

fullDocumentContext emoji scan issue

Issue Description

When the text contains emojis, additional symbols are added in the text. This issue occurs when the text includes three consecutive emojis, and the scan result duplicates the first three letters of the word following the emojis.

Steps to Reproduce

  1. Open the text containing three consecutive emojis and a word following them, for example:
Combinations are simply a set of emojis arranged one after the other, for example: 👑💬🎤. You can use them to make riddles or communicate without words. Also, combinations can express emotions and moods, for example, 👀👀👀 can mean curiosity or surprise. Combinations have become popular in messages and social networks, where they give text more expressiveness
  1. Summarize or autocorrect the text.
  2. Observe the generated prompt.

Actual Result

After running the fullDocumentContext feature, the result includes additional symbols, such as "ComCombinations" and "AlsAlso," which duplicate the first three letters of the word following the emojis:

ComCombinations are simply a set of emojis arranged one after the other, for example: 👑💬🎤. You can use them to make riddles or communicate without words. AlsAlso, combinations can express emotions and moods, for example, 👀👀👀 can mean curiosity or surprise. Combinations have become popular in messages and social networks, where they give text more expressiveness

Environment

KeyboardKitPro 7.5.0

fullDocumentContext bug

The fullDocumentContext() function always copies the text at least twice.

Here’s a simple example of sending the fullDocumentContext result to the pasteboard and then manually pasting it elsewhere:

Code:
Button(action : { Task { let proxy = keyboardContext.textDocumentProxy let result = try? await proxy.fullDocumentContext() await MainActor.run { UIPasteboard.general.string = result?.fullDocumentContext } } }, label: { Image(systemName: "wand.and.stars").frame(width: 32, height: 32, alignment: .center) })

Video:
https://user-images.githubusercontent.com/39917898/210093317-94777503-a397-4112-b112-7277a697f79f.mp4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.