Skip to content

Send text using commands via simple cmds#69

Closed
thomasm789 wants to merge 31 commits into
unfoldedcircle:mainfrom
thomasm789:send-text
Closed

Send text using commands via simple cmds#69
thomasm789 wants to merge 31 commits into
unfoldedcircle:mainfrom
thomasm789:send-text

Conversation

@thomasm789
Copy link
Copy Markdown
Contributor

@thomasm789 thomasm789 commented May 1, 2025

Application list + ADB is included in this branch (merge PR #68 first)

This PR introduces an interim solution for on-screen text input using AndroidTVRemote2 package for near instant response (does not use ADB). It includes support for the full English alphabet, space, and backspace commands. In the future, this implementation will need to be refactored at a later date to conform with native text entry once supported.

I also cleaned up location for all certs to be in one place and updated the deletion/removal device process to remove the certs.

What's Included:
Dynamic command mapping for:

TEXT_A to TEXT_Z: Sends lowercase letters using the 'TEXT' command type

TEXT_SPACE: Sends a space character (' ')

TEXT_BACKSPACE: Sends KeyCode.DEL via 'KEY' command type to simulate backspace

Usage Notes:
To use these commands:

Create a new text/icon widget

For text input, label the widget with "A" and set the command to "TEXT_A", "TEXT_B", etc., accordingly

Use "TEXT_SPACE" for space and "TEXT_BACKSPACE" for character deletion.

Example:
Screenshot_2-5-2025_114241_192 168 0 201

@thomasm789 thomasm789 marked this pull request as ready for review May 1, 2025 08:51
@thomasm789 thomasm789 changed the title Send text using commands via entities Send text using commands via simple cmds May 2, 2025
@zehnm zehnm self-requested a review May 7, 2025 17:02
Copy link
Copy Markdown
Contributor

@zehnm zehnm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an initial quick look. I'll test it once #68 is merged.

Comment thread src/profiles.py

# Map the command: space gets ' ', others get lowercase letter
command_value = " " if char == " " else char.lower()
select_profile.command_map[command_name] = Command(command_value, 'TEXT')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be of type KeyPress IntEnum. Please enhance KeyPress with TEXT = 5

Comment thread src/tv.py
:return: OK if scheduled to be sent, other error code in case of an error

""" # noqa
if action == 'TEXT':
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See KeyPress enum above

@thomasm789 thomasm789 closed this May 15, 2025
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.

2 participants