Skip to content

Can't declare Ctrl+Question key binding #20

Closed
@rkeithhill

Description

@rkeithhill

If I attempt this I get the following error:

Set-PSReadlineKeyHandler : Cannot process argument transformation on parameter 'Key'. Unrecognized key 'question'.
Please use a character literal or a well-known key name from the System.ConsoleKey enumeration.
At C:\Users\Keith\Documents\WindowsPowerShell\profile.ps1:9 char:35

  • Set-PSReadlineKeyHandler -Key Ctrl+Question -BriefDescription GetKeyHandlers ...
    
  •                               ~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Set-PSReadlineKeyHandler], ParameterBindingArgumentTransformationExcep
      tion
    • FullyQualifiedErrorId : ParameterArgumentTransformationError,PSConsoleUtilities.SetKeyHandlerCommand

This is my handler decl:

Set-PSReadlineKeyHandler -Key Ctrl+Question -BriefDescription GetKeyHandlers -Handler { 
    [PSConsoleUtilities.PSConsoleReadLine]::GetKeyHandlers()
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions