Skip to content

Report handler and hot key removal, add secure event input and TSM document properties - #53

Merged
colemancda merged 7 commits into
masterfrom
feature/carbon-event-state
Dec 2, 2026
Merged

colemancda merged 7 commits into
masterfrom
feature/carbon-event-state

Conversation

@colemancda

Copy link
Copy Markdown
Member

Summary

Carbon's event functions in Perry's AppKit provider move onto GraphiteEvents. These are the pieces Graphite lacked:

  • EventTarget.remove, addTypes and removeTypes return false for a handler that is not installed (RemoveEventHandler and the type calls answer a parameter error). They are @discardableResult, so existing callers still compile.
  • HotKeyRegistry.unregister returns false for a combination that is not registered, also @discardableResult.
  • SecureEventInput: enabling nests, disabling when it is not on is reported and leaves it off.
  • TSMDocument properties: setProperty, property and removeProperty. Removing a property never set is not an error.

Testing

  • swift test --filter GraphiteEventsTests passes (23 tests).
  • Behavior checked against a probe program on macOS: nested secure input, the extra disable, handler and hot key removal results, and TSM property set and remove.

Not covered

  • TSMDocument properties were checked on macOS only for a null document and NewTSMDocument documents through the C API, not for every tag.

@colemancda
colemancda merged commit ff491dd into master Dec 2, 2026
3 checks passed
@colemancda
colemancda deleted the feature/carbon-event-state branch December 2, 2026 04:35
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.

1 participant