Skip to content

Home key and End key are now not working with TERM=xterm #421

Closed

Description

Readline won't register proper key presses. They were confirmed working with the first System.Console patch. Something happened between the first System.Console patch and the dotnet cli build to cause them to stop working.
VSO create date - 12/22/2015 11:09:00

Activity

  1. andyleejordan commented on Jan 23, 2016

    @andyleejordan
    MemberAuthor

    Certain terminal emulators send Home and End as multiple character combinations, which Console.ReadKey() does not register as Home and End, and we're not currently checking for either.

    This is doable, but won't be fun.

  2. andyleejordan commented on Jan 28, 2016

    @andyleejordan
    MemberAuthor

    This is related to #461.

  3. andyleejordan commented on Feb 19, 2016

    @andyleejordan
    MemberAuthor

    This got stranger. It works correctly in Tmux (with TERM=screen). Something about xterm in particular is sending a weird key combo for this.

  4. added
    Usability(LEGACY) Helps filter issues that might be higher priority because they directly affect usability
    on Feb 20, 2016
  5. vors commented on Feb 20, 2016

    @vors
    Collaborator

    Can we support Ctrl+A and Ctrl+D ?

    There are no separate Home and End on Mac:
    Fn+Shift+Left and Fn+Shift+Right works (just found them, when I was writing it)

    Also, how about Ctrl+C? It's so annoying not being able to drop a long line

  6. andyleejordan commented on Feb 20, 2016

    @andyleejordan
    MemberAuthor

    Zach Folwick (@zach-folwick) Was wanting that in #562, but I think it falls under porting PSReadLine. If that is ported and we have it by default, we'll get everything we want. Without having to implement it twice.

    Jason Shirk (@lzybkr) What do you think?

  7. andyleejordan commented on Feb 20, 2016

    @andyleejordan
    MemberAuthor

    Ctrl-C should work. It's handled by PowerShell and used to interrupt the running cmdlet.

  8. vors commented on Feb 20, 2016

    @vors
    Collaborator

    Andy Jordan (@andschwa) yes, it works as an interrupt. But when I'm entering a command and say wrote a long line (without running it), I need a way to drop it.

  9. andyleejordan commented on Feb 20, 2016

    @andyleejordan
    MemberAuthor

    Ah, like ESC's behavior on Windows.

  10. vors commented on Feb 20, 2016

    @vors
    Collaborator

    Oh Esc works, good to know

  11. andyleejordan commented on Feb 26, 2016

    @andyleejordan
    MemberAuthor

    HOME and END work properly under screen and putty TERMs.

    infocmp putty | grep khome
            khome=\E[1~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~,
    

    And HOME is coming in as ^[[1~.

    infocmp xterm | grep khome
            kf8=\E[19~, kf9=\E[20~, khome=\EOH, kich1=\E[2~,
    

    So this is a case of xterm not being 100% correct for certain Terminal emulators, like PuTTY. And is likely the case on MobaXterm.

    A (@ealexjordan) Can you see what the HOME key is coming in as in your emulator? (Press Ctrl-V + HOME.) If it's the same, then xterm is not correct for MobaXterm and we can close this.

  12. andyleejordan commented on Feb 26, 2016

    @andyleejordan
    MemberAuthor

    It appears to me that TERM=screen is what MobaXterm should be using, as that makes HOME/END line up with the expected key codes.

    This is an emulator configuration issue, not a PowerShell or .NET issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Usability(LEGACY) Helps filter issues that might be higher priority because they directly affect usability

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions