Skip to content

fix windows fullscreen rendering keyboard demo#34

Closed
jbolda wants to merge 3 commits into
mainfrom
windows-keyboard-demo-fix
Closed

fix windows fullscreen rendering keyboard demo#34
jbolda wants to merge 3 commits into
mainfrom
windows-keyboard-demo-fix

Conversation

@jbolda

@jbolda jbolda commented May 20, 2026

Copy link
Copy Markdown
Collaborator

Motivation

The bottom of our demos were clipped around ~20px.

Approach

The full string wasn't being written out in windows, so we needed a loop to finish writing it.

@pkg-pr-new

pkg-pr-new Bot commented May 20, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/clayterm@34

commit: 4e2fb43

@cowboyd

cowboyd commented May 20, 2026

Copy link
Copy Markdown
Collaborator

Yikes! Is there anywhere we can read up on the differences of fullscreen on windows?

@jbolda

jbolda commented May 20, 2026

Copy link
Copy Markdown
Collaborator Author

I was reading through this last night, but I haven't seen anything explicitly pointing to the issue, at least that buffered fullscreen write issue specifically.
https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#alternate-screen-buffer

@cowboyd

cowboyd commented May 20, 2026

Copy link
Copy Markdown
Collaborator

Hmmm. Nothing leaps out to me about how this might be different than the way other terminal emulators handle it. Maybe we can ask a robot why that fix works.

@jbolda

jbolda commented May 22, 2026

Copy link
Copy Markdown
Collaborator Author

Turns out it was slow IO on Windows with Deno (non-built / running directly) and Deno doesn't guarantee to write everything to stdout in a single call so we need a loop over it.

@jbolda jbolda force-pushed the windows-keyboard-demo-fix branch from e04c025 to a3d119e Compare May 23, 2026 05:15
@jbolda jbolda force-pushed the windows-keyboard-demo-fix branch from a3d119e to 4e2fb43 Compare May 23, 2026 06:24
@jbolda

jbolda commented May 27, 2026

Copy link
Copy Markdown
Collaborator Author

As this has become more of an adjustment to an example, I am going to pull out the result of this work into a separate PR. We are going to adjust our examples now and in the future to only use the node: APIs which should resolve this issue (that API presumably writes differently). It will also make the examples runnable in node as well.

@jbolda jbolda mentioned this pull request May 28, 2026
@jbolda

jbolda commented May 28, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded. See #48.

@jbolda jbolda closed this May 28, 2026
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