I currently am half-happy with the PSReadLine module's MenuComplete function assigned to my Tab key, and was looking for a way to navigate around the offered menu with the HJKL keys. I currently have this on top of my profile:
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
I tried the following:
Set-PSReadlineKeyHandler -Chord Ctrl+K -Function UpArrow
Which I hoped would at least simulate up arrow key with the combination Ctrl+K, but to no avail, as UpArrow is not recognized as a function.
If I am allowed to dream, I would like to;
- Initiate
MenuCompleteusingTab, - Use HJKL for moving my selection around, and
- Use
Tabagain for confirming a selection and dismissingMenuComplete.
From the PSReadLine docs, there are the NextSuggestion and the PreviousSuggetion functions: https://learn.microsoft.com/en-us/powershell/module/psreadline/about/about_psreadline?view=powershell-7.2#nextsuggestion
Now, on the Set-PSReadLineKeyHandler page, there is a warn saying that the -Chord parameter is case-sensitive.
So, the correct configuration you need are: