Skip to content

Show how to take a screenshot on a key press - #2963

Merged
pvcraven merged 1 commit into
developmentfrom
screenshot-key-example
Oct 9, 2026
Merged

pvcraven merged 1 commit into
developmentfrom
screenshot-key-example

Conversation

@pvcraven

@pvcraven pvcraven commented Oct 9, 2026

Copy link
Copy Markdown
Member

Closes #1338

The get_image docstring now shows how to take a screenshot when a key is pressed: set a flag in on_key_press and save the image at the end of on_draw. Calling get_image() directly in on_key_press can return a black image (see the note added in #2961).

I checked the pattern on Windows. The saved image has the drawn colors, not black.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pvcraven
pvcraven merged commit e8ea791 into development Oct 9, 2026
7 checks passed
@pvcraven
pvcraven deleted the screenshot-key-example branch October 9, 2026 14:43
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.

Documentation: Add guide on taking screenshots & recordings

1 participant