summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCĂ©lestin Matte <celestin.matte@gmail.com>2014-12-29 23:57:56 +0100
committermathieui <mathieui@mathieui.net>2014-12-31 00:06:41 +0100
commit8e575de52c3c779fbc66c1d74aebb75522d072a0 (patch)
tree6f93a17c83f18a7ef0e39d431ad2198854e1a085 /src
parentcf04e65983a133d8d9164ebda80ea0a5e89f4378 (diff)
downloadpoezio-8e575de52c3c779fbc66c1d74aebb75522d072a0.tar.gz
poezio-8e575de52c3c779fbc66c1d74aebb75522d072a0.tar.bz2
poezio-8e575de52c3c779fbc66c1d74aebb75522d072a0.tar.xz
poezio-8e575de52c3c779fbc66c1d74aebb75522d072a0.zip
Fix broken CTRL+arrow key shortcuts under some terms
Diffstat (limited to 'src')
-rwxr-xr-xsrc/keyboard.py3
-rw-r--r--src/windows/inputs.py2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/keyboard.py b/src/keyboard.py
index ec1e7d0a..ccf9e752 100755
--- a/src/keyboard.py
+++ b/src/keyboard.py
@@ -66,6 +66,9 @@ def get_char_list(s):
if key == '^[':
try:
part = s.get_wch()
+ if part == '[':
+ # CTRL+arrow and meta+arrow keys have a long format
+ part += s.get_wch() + s.get_wch() + s.get_wch() + s.get_wch()
except curses.error:
pass
except ValueError: # invalid input
diff --git a/src/windows/inputs.py b/src/windows/inputs.py
index 2cf719ba..12d3a9a2 100644
--- a/src/windows/inputs.py
+++ b/src/windows/inputs.py
@@ -43,6 +43,8 @@ class Input(Win):
'^D': self.key_dc,
'M-b': self.jump_word_left,
"M-[1;5D": self.jump_word_left,
+ "kRIT5": self.jump_word_right,
+ "kLFT5": self.jump_word_left,
'^W': self.delete_word,
'M-d': self.delete_next_word,
'^K': self.delete_end_of_line,