Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/formbridge/key_declarations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading