8000 PSReadline should not bind to keys that are not usable · Issue #3890 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

PSReadline should not bind to keys that are not usable #3890

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

Closed
SteveL-MSFT opened this issue May 30, 2017 · 4 comments
Closed

PSReadline should not bind to keys that are not usable #3890

SteveL-MSFT opened this issue May 30, 2017 · 4 comments
Assignees
Labels
Resolution-External The issue is caused by external component(s). WG-Interactive-PSReadLine PSReadline related issues
Milestone

Comments

@SteveL-MSFT
Copy link
Member

#3815 (comment)

On Nano, two apis are not available which prevents usage, for example, of ctrl+] as a valid key chord to bind to a PSReadline handler. PSReadline, by default, binds this key combination to go to matching brace. When connected directly to a Nano container (not via PSRP), it will show:

Ctrl+Oem6             GotoBrace               Go to matching brace

which is not useful to the end user. It seems the right thing to do may be to not bind this (as well as two other chords dependent on ]) by default if those APIs are not avaialble.

@SteveL-MSFT SteveL-MSFT added the WG-Interactive-PSReadLine PSReadline related issues label May 30, 2017
@SteveL-MSFT SteveL-MSFT self-assigned this May 30, 2017
@SteveL-MSFT SteveL-MSFT added this to the 6.0.0-HighPriority milestone May 30, 2017
@lzybkr
Copy link
Contributor
lzybkr commented May 31, 2017

Are you sure the binding doesn't work?

From my understanding, this is a simple UI problem in the output of Get-PSReadlineBoundParameters - the key binding should still work.

@SteveL-MSFT
Copy link
Member Author

When I hit Ctrl+] on Nano, it just shows ^] on the screen

@lzybkr
Copy link
Contributor
lzybkr commented May 31, 2017

Interesting - that seems like a distinct problem from the proposed change in #3815, though it's possible that .Net is using that api as well, and has a different code path when it's not present.

I'm curious what you get from the following when you type Ctrl+], e.g. this is from Windows 10 CU:

#762 PS> $x = [Console]::ReadKey($true)
#763 PS> $x

KeyChar  Key Modifiers
-------  --- ---------
      � Oem6   Control


#764 PS> [int]$x.KeyChar
29

@SteveL-MSFT SteveL-MSFT added the Resolution-External The issue is caused by external component(s). label Jun 22, 2017
@SteveL-MSFT
Copy link
Member Author

Current plan is for future NanoServer to support the missing APIs, so no work to be done here.

TFS:12445647

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-External The issue is caused by external component(s). WG-Interactive-PSReadLine PSReadline related issues
Projects
None yet
Development

No branches or pull requests

2 participants
0