fix ghostty keyboard layout keyup leak#190
Merged
Merged
Conversation
Summary: - suppress only the stale keyUp that follows a keyboard layout switch - leave modifier flagsChanged events on the normal path - add regression tests for matching, expiry, and negative cases Rationale: - the leaked sequence is the trigger key release, so suppressing modifier changes is broader than needed - keeping flagsChanged untouched avoids reintroducing modifier binding regressions while still fixing the raw key leak Validation: - xcrun swift-format -p --in-place --recursive --configuration ./.swift-format.json supacode supacodeTests - mise exec -- swiftlint --fix --quiet - mise exec -- swiftlint lint --quiet --config .swiftlint.yml - xcodebuild test -project supacode.xcodeproj -scheme supacode -destination 'platform=macOS' -only-testing:supacodeTests/GhosttySurfaceViewTests CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY='' -skipMacroValidation - make build-app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
summary
keyUpthat follows a keyboard layout switchflagsChangedon the normal pathwhy
the leaked sequence is the trigger key release, so swallowing modifier
changes is broader than needed and risks breaking other bindings.
this pr supersedes #179.
validation
xcrun swift-format -p --in-place --recursive --configuration ./.swift-format.json supacode supacodeTestsmise exec -- swiftlint --fix --quietmise exec -- swiftlint lint --quiet --config .swiftlint.ymlxcodebuild test -project supacode.xcodeproj -scheme supacode -destination "platform=macOS" -only-testing:supacodeTests/GhosttySurfaceViewTests CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY="" -skipMacroValidationmake build-app