From 7e8156566aa1f7857fb9616842d866f96134f481 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Sat, 12 Sep 2015 22:56:18 +0200 Subject: [PATCH] window: add support for emacs terminal --- src/window.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/window.cpp b/src/window.cpp index 4cb98d73..f67c02a8 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -806,10 +806,20 @@ Key::Type Window::getInputChar(int key) { case '\t': // tty return Key::Shift | Key::Tab; - case 'O': // ctrl+arrows in rxvt, F1 to F4 in xterm + case 'O': key = wgetch(m_window); switch (key) { + // eterm + case 'A': + return Key::Up; + case 'B': + return Key::Down; + case 'C': + return Key::Right; + case 'D': + return Key::Left; + // rxvt case 'a': return Key::Ctrl | Key::Up; case 'b': @@ -818,6 +828,7 @@ Key::Type Window::getInputChar(int key) return Key::Ctrl | Key::Right; case 'd': return Key::Ctrl | Key::Left; + // xterm case 'P': return Key::F1; case 'Q':