Skip to content

cursor_x and cursor_y properties on Terminal #10442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 25, 2025

Conversation

FoamyGuy
Copy link
Collaborator

Terminal already has these values internally, this change exposes them to python.

My intention is to utilize these with a custom wrapper of Terminal class that adds support for ANSI color escapes. Having access to the cursor position makes it easy to know where in the TileGrid the colors need to get changed when an escape code is encountered.

If this overflows builds one option is try to make these available only if the tilepalettemapper module is enabled if that's possible. It's turned off for the tight builds. The two features aren't intrinsically linked, but I have no current intentions to use cursor position without tpm so it could save space and still allow my use-case.

Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

Great -thanks!

@dhalbert dhalbert merged commit e3c5548 into adafruit:main Jun 25, 2025
544 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.

2 participants