-
Notifications
You must be signed in to change notification settings - Fork 312
Can't declare Ctrl+Question key binding #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You can but you want Ctrl-? or more likely Ctrl-/
|
Yes, Ctrl+/ makes more sense (don't want to have to press Shift). But for help, what I was thinking is it would be the output of this command:
Plus some general text info on how to use PSReadLine. Like if you're using less on a file and you press 'h' you get help on how to use less. |
So would the remainder of your request be a duplicate of #24? |
Well except that the keybinding Ctrl+/ doesn't work with the latest drop. |
Seems to work for me. The code you posted in the original post doesn't work because the -Handler option does not exist. Does this not work for you?
Note that with this binding Ctrl+/ won't do anything unless you have enter something that can potentially be completed. |
OK apparently the keybinding works but just not for GetKeyHandlers():
Weird. |
Not weird, it's by design. GetKeyHandlers doesn't have any side effects, so if it was bound to a key, it wouldn't be useful. I do plan on adding what I think you want. |
This is now addressed. Get-PSReadlineKeyHandler should now look better and match what you would use with Set-PSReadlineKeyHandler.
The actual commits: |
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
tion
This is my handler decl:
The text was updated successfully, but these errors were encountered: