Documentation Issue: "WxH character" undefined #2733

Closed
opened 2026-01-30 23:03:34 +00:00 by claunia · 3 comments
Owner

Originally created by @jzabroski on GitHub (Jul 12, 2019).

See this page: https://github.com/microsoft/terminal/blob/master/doc/ConsoleHostSettings.md
And this blog post by @mscraigloewen https://devblogs.microsoft.com/commandline/understanding-windows-console-host-settings/

Both use the phrase "WxH characters" for describing window width and height, but I can't find a definition for this anywhere. I'm guessing it's a 32 bit value where the upper 16 bits are width and the lower 16 bit value is height, but, AGAIN, I can't find this documented anywhere.

Originally created by @jzabroski on GitHub (Jul 12, 2019). See this page: https://github.com/microsoft/terminal/blob/master/doc/ConsoleHostSettings.md And this blog post by @mscraigloewen https://devblogs.microsoft.com/commandline/understanding-windows-console-host-settings/ Both use the phrase "WxH characters" for describing window width and height, but I can't find a definition for this anywhere. I'm guessing it's a 32 bit value where the upper 16 bits are width and the lower 16 bit value is height, but, AGAIN, I can't find this documented anywhere.
claunia added the Resolution-Fix-CommittedArea-SettingsIssue-DocsProduct-Meta labels 2026-01-30 23:03:34 +00:00
Author
Owner

@jzabroski commented on GitHub (Jul 12, 2019):

@mscraigloewen responded on Twitter.

WxH stands for Width by Height, it's the fact that things like a Window size store the Width and Height values in the high and low word in the registry's double word values.

Below is my PowerShell script which demonstrates how to pull the values:

$windowSize = $(get-item hkcu:\console).GetValue("WindowSize")
$windowHeight = $windowSize -shr 16
$windowWidth = ($windowSize -shl 16) -shr 16

Cross-posted on SO: https://stackoverflow.com/a/57013539/1040437

Thanks, @mscraigloewen !

@jzabroski commented on GitHub (Jul 12, 2019): @mscraigloewen responded on Twitter. > WxH stands for Width by Height, it's the fact that things like a Window size store the Width and Height values in the high and low word in the registry's double word values. Below is my PowerShell script which demonstrates how to pull the values: ```powershell $windowSize = $(get-item hkcu:\console).GetValue("WindowSize") $windowHeight = $windowSize -shr 16 $windowWidth = ($windowSize -shl 16) -shr 16 ``` Cross-posted on SO: https://stackoverflow.com/a/57013539/1040437 Thanks, @mscraigloewen !
Author
Owner

@tapaswenipathak commented on GitHub (Jul 25, 2019):

Hi @jzabroski: I took the liberty for pushing a PR, attached, hope it is useful.

@tapaswenipathak commented on GitHub (Jul 25, 2019): Hi @jzabroski: I took the liberty for pushing a PR, attached, hope it is useful.
Author
Owner

@jzabroski commented on GitHub (Jul 25, 2019):

@tapaswenipathak I do not work for Microsoft, but I recommend adding the above powershell snippet to demonstrate how to manipulate the high-order word and low-order word.

@jzabroski commented on GitHub (Jul 25, 2019): @tapaswenipathak I do not work for Microsoft, but I recommend adding the above powershell snippet to demonstrate how to manipulate the high-order word and low-order word.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#2733