Skip to content
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

Out-ConsoleGridView Makes Arrow Keys Not Working #49

Closed
chenrylee opened this issue Mar 7, 2020 · 12 comments · Fixed by #56
Closed

Out-ConsoleGridView Makes Arrow Keys Not Working #49

chenrylee opened this issue Mar 7, 2020 · 12 comments · Fixed by #56
Labels
bug Something isn't working Issue-gui.cs This issue is a gui.cs issue Module-ConsoleGuiTools This issue is about Microsoft.PowerShell.ConsoleGuiTools

Comments

@chenrylee
Copy link

Steps to reproduce

  1. Open the terminal (I'm using iTerm2) and run pwsh (my version is 7.0 GA)
  2. Run any cmdlets and pipeline to Out-ConsoleGridView;
Get-ChildItem | Out-ConsoleGridView
  1. Press F9 and close the interface;
  2. Press up key to quick refer the previous commands.

Now the up key doesn't work, I have to quit the terminal and re-open.

@TylerLeonhardt
Copy link
Member

TylerLeonhardt commented Mar 7, 2020

Does it work again after you run something in the terminal like gci?

@alexandair
Copy link

I can confirm the same issue in Ubuntu (WSL).

@TylerLeonhardt
Copy link
Member

This is most certainly upstream... but I'll leave it open because I'm not sure which gui.cs issue to dupe it to and it could be fixed in one of the existing PRs.

@TylerLeonhardt TylerLeonhardt added bug Something isn't working Issue-gui.cs This issue is a gui.cs issue Module-ConsoleGuiTools This issue is about Microsoft.PowerShell.ConsoleGuiTools labels Mar 7, 2020
@chenrylee
Copy link
Author

Does it work again after you run something in the terminal like gci?

Nope, the only way is to restart PowerShell session, I even tried to remove and import module PSReadLine.

@TylerLeonhardt
Copy link
Member

TylerLeonhardt commented Mar 8, 2020

This only seems to happen on Linux. macOS is not affected.

@chenrylee
Copy link
Author

This only seems to happen on Linux. macOS is not affected.

Also on MacOS, I'm running pwsh 7.0 GA on Catalina, iTerm2.

@TylerLeonhardt
Copy link
Member

TylerLeonhardt commented Mar 8, 2020

Also on MacOS, I'm running pwsh 7.0 GA on Catalina, iTerm2.

hmm I have the same setup and can't repro... ahh... I can repro without my custom prompt function.

Interesting...

@TylerLeonhardt
Copy link
Member

ok the up arrow seems to work after calling out to a native executable like ls or cat.

@chenrylee
Copy link
Author

ok the up arrow seems to work after calling out to a native executable like ls or cat.

Yep, confirmed, same to me~ 🌝

@TylerLeonhardt
Copy link
Member

Looks like this affects all arrow keys.

@TylerLeonhardt TylerLeonhardt changed the title Out-ConsoleGridView Makes Up Key Not Working Out-ConsoleGridView Makes Arrow Keys Not Working Mar 10, 2020
@TylerLeonhardt
Copy link
Member

TylerLeonhardt commented Mar 10, 2020

Emitting

"`e[?1h"

fixes this...

@kort3x
Copy link

kort3x commented Mar 13, 2020

issue persists on WSL2 on Win10 19577 preview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Issue-gui.cs This issue is a gui.cs issue Module-ConsoleGuiTools This issue is about Microsoft.PowerShell.ConsoleGuiTools
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants