Skip to content

Key declarations move here from Textual - #14

Merged
trissim merged 1 commit into
mainfrom
claude-a/key-declarations
Nov 16, 2026
Merged

trissim merged 1 commit into
mainfrom
claude-a/key-declarations

Conversation

@trissim

@trissim trissim commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

KeyDeclarationType, KeyInvocation, KeyTitle and KeyDeclaration move unchanged from Textual's textual/keys.py into metaclass_registry/key_declarations.py, next to AbstractHooksMeta (#13). Clients that run without Textual, like the Qt client, can now declare actions together with their keys.

  • InputMode / ModalInputMode say which input mode a key is declared under. Textual's EditingMode and VimMode subclass them.
  • KeyDeclaration's abstract bindings_for stays in Textual as BindingDeclaration. Turning a declaration into bindings is Textual's job.

Consumers: OpenHCSDev/textual imports these back and deletes its copy; OpenHCSDev/toad builds its shared ApplicationAction family on them.

Check: textual_free.py metaclass_registry.key_declarations prints OK (it imports with Textual blocked).

🤖 Generated with Claude Code

https://claude.ai/code/session_016gZLdupVQyBzHTmHBC9Cyn

…eclare keys

KeyDeclarationType, KeyInvocation, KeyTitle and KeyDeclaration move unchanged from
textual/keys.py. InputMode and ModalInputMode are the identity of an input mode that
Textual's EditingMode and VimMode now subclass. KeyDeclaration's abstract bindings_for
stays in Textual: projecting a declaration into bindings is the toolkit's job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLdupVQyBzHTmHBC9Cyn
@trissim
trissim merged commit 65857f4 into main Nov 16, 2026
9 of 10 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.

1 participant