From 3302c730af597aecee27e2bfb3a76b75884e919d Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 15 Feb 2011 20:33:00 +0100 Subject: Ctrl+left and right jump a word in the input --- src/windows.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/windows.py b/src/windows.py index 8d2af94c..1a59f260 100644 --- a/src/windows.py +++ b/src/windows.py @@ -706,6 +706,7 @@ class Input(Win): "KEY_DC": self.key_dc, '^D': self.key_dc, 'M-b': self.jump_word_left, + "M-[1;5D": self.jump_word_left, '^W': self.delete_word, '^K': self.delete_end_of_line, '^U': self.delete_begining_of_line, @@ -713,6 +714,7 @@ class Input(Win): '^A': self.key_home, '^E': self.key_end, 'M-f': self.jump_word_right, + "M-[1;5C": self.jump_word_right, "KEY_BACKSPACE": self.key_backspace, '^?': self.key_backspace, } @@ -991,8 +993,8 @@ class Input(Win): if self.on_input: self.on_input(self.get_text()) return res - # if not key or len(key) > 1: - # return False # ignore non-handled keyboard shortcuts + if not key or len(key) > 1: + return False # ignore non-handled keyboard shortcuts self.reset_completion() self.text = self.text[:self.pos+self.line_pos]+key+self.text[self.pos+self.line_pos:] (y, x) = self._win.getyx() -- cgit v1.2.3