summaryrefslogtreecommitdiffstats
path: root/library/text.tcl
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-01-06 18:37:35 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-01-06 18:37:35 (GMT)
commit078fd483b608ea19f2d47f36f5a6a8a3a1c04405 (patch)
treeeb752269f6622bc209b2f65910151a86a2369d2a /library/text.tcl
parent1a6ac30b077e52ba1da9ac22a8d38356ece00cec (diff)
downloadtk-078fd483b608ea19f2d47f36f5a6a8a3a1c04405.zip
tk-078fd483b608ea19f2d47f36f5a6a8a3a1c04405.tar.gz
tk-078fd483b608ea19f2d47f36f5a6a8a3a1c04405.tar.bz2
Centralize the definitions of what keys do particular types of left and right
movements in entries and text widgets. They vary between platforms!
Diffstat (limited to 'library/text.tcl')
-rw-r--r--library/text.tcl26
1 files changed, 13 insertions, 13 deletions
diff --git a/library/text.tcl b/library/text.tcl
index 509d425..74a8d6b 100644
--- a/library/text.tcl
+++ b/library/text.tcl
@@ -3,7 +3,7 @@
# This file defines the default bindings for Tk text widgets and provides
# procedures that help in implementing the bindings.
#
-# RCS: @(#) $Id: text.tcl,v 1.44 2009/10/25 13:47:16 dkf Exp $
+# RCS: @(#) $Id: text.tcl,v 1.45 2010/01/06 18:37:36 dkf Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -88,10 +88,10 @@ bind Text <ButtonRelease-1> {
bind Text <Control-1> {
%W mark set insert @%x,%y
}
-bind Text <Left> {
+bind Text <<PrevChar>> {
tk::TextSetCursor %W insert-1displayindices
}
-bind Text <Right> {
+bind Text <<NextChar>> {
tk::TextSetCursor %W insert+1displayindices
}
bind Text <Up> {
@@ -100,10 +100,10 @@ bind Text <Up> {
bind Text <Down> {
tk::TextSetCursor %W [tk::TextUpDownLine %W 1]
}
-bind Text <Shift-Left> {
+bind Text <<SelectPrevChar>> {
tk::TextKeySelect %W [%W index {insert - 1displayindices}]
}
-bind Text <Shift-Right> {
+bind Text <<SelectNextChar>> {
tk::TextKeySelect %W [%W index {insert + 1displayindices}]
}
bind Text <Shift-Up> {
@@ -112,10 +112,10 @@ bind Text <Shift-Up> {
bind Text <Shift-Down> {
tk::TextKeySelect %W [tk::TextUpDownLine %W 1]
}
-bind Text <Control-Left> {
+bind Text <<PrevWord>> {
tk::TextSetCursor %W [tk::TextPrevPos %W insert tcl_startOfPreviousWord]
}
-bind Text <Control-Right> {
+bind Text <<NextWord>> {
tk::TextSetCursor %W [tk::TextNextWord %W insert]
}
bind Text <Control-Up> {
@@ -124,10 +124,10 @@ bind Text <Control-Up> {
bind Text <Control-Down> {
tk::TextSetCursor %W [tk::TextNextPara %W insert]
}
-bind Text <Shift-Control-Left> {
+bind Text <<SelectPrevWord>> {
tk::TextKeySelect %W [tk::TextPrevPos %W insert tcl_startOfPreviousWord]
}
-bind Text <Shift-Control-Right> {
+bind Text <<SelectNextWord>> {
tk::TextKeySelect %W [tk::TextNextWord %W insert]
}
bind Text <Shift-Control-Up> {
@@ -155,16 +155,16 @@ bind Text <Control-Next> {
%W xview scroll 1 page
}
-bind Text <Home> {
+bind Text <<LineStart>> {
tk::TextSetCursor %W {insert display linestart}
}
-bind Text <Shift-Home> {
+bind Text <<SelectLineStart>> {
tk::TextKeySelect %W {insert display linestart}
}
-bind Text <End> {
+bind Text <<LineEnd>> {
tk::TextSetCursor %W {insert display lineend}
}
-bind Text <Shift-End> {
+bind Text <<SelectLineEnd>> {
tk::TextKeySelect %W {insert display lineend}
}
bind Text <Control-Home> {