From 00227b9207929b4c77ee4703850dc0f3cdb2632b Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Mon, 16 Nov 2026 16:21:28 -0500 Subject: [PATCH] NativeTextKeys is declared here: a control whose printable keys are text The capability moves from the Textual fork's _editing.py; its key mode is the text-entry identity, not Textual's TextArea engine. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016gZLdupVQyBzHTmHBC9Cyn --- src/formbridge/key_declarations.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/formbridge/key_declarations.py b/src/formbridge/key_declarations.py index e78f461..a47133f 100644 --- a/src/formbridge/key_declarations.py +++ b/src/formbridge/key_declarations.py @@ -331,3 +331,19 @@ class KeymapClaim: invocation: KeyInvocation keys: tuple[str, ...] + + +class NativeTextKeys: + """A control whose printable keys are text, whatever its screen's keyboard profile.""" + + @property + def takes_typed_text(self) -> bool: + return True + + @property + def key_mode(self) -> type[TextEntryMode]: + return TextEntryMode + + @property + def allows_application_commands(self) -> bool: + return self.key_mode().allows_application_commands