diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-05-07 05:03:21 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-05-07 05:03:21 +0200 |
commit | b04f08ba483c800ea28afba3bc1d33a2542bbbbb (patch) | |
tree | fa7e0a1c6785f5d0880a93269453fb9a1db9527e /Applications | |
parent | d53941a46689ed612450c04c426c7be40ff410cd (diff) | |
download | serenity-b04f08ba483c800ea28afba3bc1d33a2542bbbbb.zip |
Shell: Support home/end keys for line editing.
Diffstat (limited to 'Applications')
-rw-r--r-- | Applications/Terminal/Terminal.cpp | 6 |
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; |