Skip to content

Conversation

@NickCulbertson
Copy link
Member

This fixes the stuck key issue on key edge taps. It appears we had an external trigger for notes on and off that wasn't an issue until iOS 18.

@aure I'm not sure if this change affects anything you are working with, but it fixed my issue.

@NickCulbertson NickCulbertson marked this pull request as draft April 7, 2025 16:46
@NickCulbertson
Copy link
Member Author

Actually this might be fixing my issue, but messing with latching. Checking.

@NickCulbertson
Copy link
Member Author

Hmm. The SwiftUI gesture is calling onEnded even when you tap outside of the key. Those touches also don't trigger the UITouch stuff. Removing that code entirely breaks latching. This may need a larger refactor.

@NickCulbertson NickCulbertson marked this pull request as ready for review April 7, 2025 23:23
@NickCulbertson
Copy link
Member Author

@aure Alright this should be ready for review again when you get a chance.

Changes: I'm passing the latching state to use or bypass the onEnded method. It worked fine in iOS 17, but now TapGesture's onEnded is called when you tap outside of the view while UITouch methods are not called.

@aure aure requested review from aure and Copilot April 8, 2025 15:50
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (3)

Sources/Keyboard/KeyboardModel.swift:12

  • If latching is intended to trigger UI updates, consider marking it with @published so that SwiftUI views correctly react to its changes.
var latching: Bool = false

Sources/Keyboard/Keyboard.swift:84

  • [nitpick] Ensure that the variable 'latching' being assigned exists in the current scope and is clearly defined to avoid ambiguity.
model.latching = latching

Sources/Keyboard/KeyContainer.swift:38

  • [nitpick] Consider adding a comment to clarify the purpose of the latching condition in this gesture block for better maintainability.
if model.latching {

@aure aure merged commit c075267 into AudioKit:main Apr 8, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants