summaryrefslogtreecommitdiff
path: root/Applications
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-05-07 05:03:21 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-05-07 05:03:21 +0200
commitb04f08ba483c800ea28afba3bc1d33a2542bbbbb (patch)
treefa7e0a1c6785f5d0880a93269453fb9a1db9527e /Applications
parentd53941a46689ed612450c04c426c7be40ff410cd (diff)
downloadserenity-b04f08ba483c800ea28afba3bc1d33a2542bbbbb.zip
Shell: Support home/end keys for line editing.
Diffstat (limited to 'Applications')
-rw-r--r--Applications/Terminal/Terminal.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Applications/Terminal/Terminal.cpp b/Applications/Terminal/Terminal.cpp
index 12752d43b0..3e628deb8d 100644
--- a/Applications/Terminal/Terminal.cpp
+++ b/Applications/Terminal/Terminal.cpp
@@ -769,6 +769,12 @@ void Terminal::keydown_event(GKeyEvent& event)
case KeyCode::Key_Left:
write(m_ptm_fd, "\033[D", 3);
break;
+ case KeyCode::Key_Home:
+ write(m_ptm_fd, "\033[H", 3);
+ break;
+ case KeyCode::Key_End:
+ write(m_ptm_fd, "\033[F", 3);
+ break;
default:
write(m_ptm_fd, &ch, 1);
break;