As many of you know I am a big fan and daily user of Windows Terminal. So much so, that I wrote a PowerShell module called WTToolBox that you can install from the PowerShell Gallery. I've pushed a new version that does a better of getting key bindings.
ManageEngine ADManager Plus - Download Free Trial
Exclusive offer on ADManager Plus for US and UK regions. Claim now!
Windows Terminal makes use of a number of keybindings (think keyboard shortcuts) that you can use. This means you can keep your hands on the keyboard instead of reaching for a mouse. My challenge has been that I've never taken the time to learn them, or at least the few I am likely to use on a daily basis. Part of the challenge is discoverability. The keybindings are defined in your settings.json file and you can add your own as well.
So instead of constantly looking at the file, I updated the Get-WTKeyBinding command in the WTToolbox module to make this super easy.
There are key bindings defined in the default settings file as well as anything that you define. Earlier versions of this command included formatting. I have no idea what I was thinking other than being lazy. As a best practice you should never include the formatting commands in your function. You want to write objects to the pipeline.
That's what I've done with the latest version. I tweaked the output to insert a custom typename.
$k.psobject.typenames.insert(0,"wtKeyBinding")
$list.add($k)
Then I used New-PSFormatXML from the PSScriptTools module to create a format.ps1xml file. I created a default table view and one for Format-List.
I also modified the command to let you specify an action. The function will tab complete all possible actions or you can use a wildcard pattern.
If you use Windows Terminal, I hope you'll give it a try and let me know what you think.