diff options
author | Kurt B. Kaiser <kbk@shore.net> | 2005-01-28 00:16:16 (GMT) |
---|---|---|
committer | Kurt B. Kaiser <kbk@shore.net> | 2005-01-28 00:16:16 (GMT) |
commit | 3069dbb8ec9c287c2ff6b3a1c8bfde83af81c11b (patch) | |
tree | 1c6112c21441dfd0c82ccdd3ab604ceff64c15ac /Lib/idlelib/EditorWindow.py | |
parent | 90cece7f8930cbfe5b87a61a1a67cfd670639c63 (diff) | |
download | cpython-3069dbb8ec9c287c2ff6b3a1c8bfde83af81c11b.zip cpython-3069dbb8ec9c287c2ff6b3a1c8bfde83af81c11b.tar.gz cpython-3069dbb8ec9c287c2ff6b3a1c8bfde83af81c11b.tar.bz2 |
Add keybindings for del-word-left and del-word-right.
M EditorWindow.py
M NEWS.txt
M config-keys.def
M configHandler.py
Diffstat (limited to 'Lib/idlelib/EditorWindow.py')
-rw-r--r-- | Lib/idlelib/EditorWindow.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index 0f14662..31f400c 100644 --- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -141,6 +141,8 @@ class EditorWindow(object): text.bind("<<change-indentwidth>>",self.change_indentwidth_event) text.bind("<Left>", self.move_at_edge_if_selection(0)) text.bind("<Right>", self.move_at_edge_if_selection(1)) + text.bind("<<del-word-left>>", self.del_word_left) + text.bind("<<del-word-right>>", self.del_word_right) if flist: flist.inversedict[self] = key @@ -386,6 +388,14 @@ class EditorWindow(object): pass return move_at_edge + def del_word_left(self, event): + self.text.event_generate('<Meta-Delete>') + return "break" + + def del_word_right(self, event): + self.text.event_generate('<Meta-d>') + return "break" + def find_event(self, event): SearchDialog.find(self.text) return "break" |