Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-3775

xterm and konsole home/end key support

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.1.0
    • Affects Version/s: None
    • Component/s: Shell
    • Labels:
      None

      diff --git a/third_party/linenoise/linenoise.cpp b/third_party/linenoise/linenoise.cpp
      index ce3e3c5..a3aad78 100644
      --- a/third_party/linenoise/linenoise.cpp
      +++ b/third_party/linenoise/linenoise.cpp
      @@ -410,6 +410,10 @@ static char linenoiseReadChar(int fd){
                       } else {
                           return -1;
                       }
      +            } else if (seq[1] == 72) { /* home (konsole) */
      +                return 1; /* ctrl-a */
      +            } else if (seq[1] == 70) { /* end (konsole) */
      +                return 5; /* ctrl-e */
                   } else {
                       return -1;
                   }
      

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: