[SERVER-3775] xterm and konsole home/end key support Created: 07/Sep/11  Updated: 11/Jul/16  Resolved: 18/Oct/11

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: 2.1.0

Type: Improvement Priority: Major - P3
Reporter: Mathias Stearn Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

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;
             }



 Comments   
Comment by auto [ 18/Oct/11 ]

Author:

{u'login': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: Support home and end keys in konsole SERVER-3775
Branch: master
https://github.com/mongodb/mongo/commit/257dc88e46733c6be76f7082b783ae340b947429

Comment by Mathias Stearn [ 07/Sep/11 ]

Actually I think this effects vanilla xterm as well

Generated at Thu Feb 08 03:04:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.