summaryrefslogtreecommitdiffstats
path: root/library/entry.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/entry.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/entry.tcl')
-rw-r--r--library/entry.tcl28
1 files changed, 15 insertions, 13 deletions
diff --git a/library/entry.tcl b/library/entry.tcl
index 9d93a24..b92f8b9 100644
--- a/library/entry.tcl
+++ b/library/entry.tcl
@@ -3,7 +3,7 @@
# This file defines the default bindings for Tk entry widgets and provides
# procedures that help in implementing those bindings.
#
-# RCS: @(#) $Id: entry.tcl,v 1.26 2007/12/13 15:26:27 dgp Exp $
+# RCS: @(#) $Id: entry.tcl,v 1.27 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.
@@ -121,45 +121,45 @@ bind Entry <Control-1> {
%W icursor @%x
}
-bind Entry <Left> {
+bind Entry <<PrevChar>> {
tk::EntrySetCursor %W [expr {[%W index insert] - 1}]
}
-bind Entry <Right> {
+bind Entry <<NextChar>> {
tk::EntrySetCursor %W [expr {[%W index insert] + 1}]
}
-bind Entry <Shift-Left> {
+bind Entry <<SelectPrevChar>> {
tk::EntryKeySelect %W [expr {[%W index insert] - 1}]
tk::EntrySeeInsert %W
}
-bind Entry <Shift-Right> {
+bind Entry <<SelectNextChar>> {
tk::EntryKeySelect %W [expr {[%W index insert] + 1}]
tk::EntrySeeInsert %W
}
-bind Entry <Control-Left> {
+bind Entry <<PrevWord>> {
tk::EntrySetCursor %W [tk::EntryPreviousWord %W insert]
}
-bind Entry <Control-Right> {
+bind Entry <<NextWord>> {
tk::EntrySetCursor %W [tk::EntryNextWord %W insert]
}
-bind Entry <Shift-Control-Left> {
+bind Entry <<SelectPrevWord>> {
tk::EntryKeySelect %W [tk::EntryPreviousWord %W insert]
tk::EntrySeeInsert %W
}
-bind Entry <Shift-Control-Right> {
+bind Entry <<SelectNextWord>> {
tk::EntryKeySelect %W [tk::EntryNextWord %W insert]
tk::EntrySeeInsert %W
}
-bind Entry <Home> {
+bind Entry <<LineStart>> {
tk::EntrySetCursor %W 0
}
-bind Entry <Shift-Home> {
+bind Entry <<SelectLineStart>> {
tk::EntryKeySelect %W 0
tk::EntrySeeInsert %W
}
-bind Entry <End> {
+bind Entry <<LineEnd>> {
tk::EntrySetCursor %W end
}
-bind Entry <Shift-End> {
+bind Entry <<SelectLineEnd>> {
tk::EntryKeySelect %W end
tk::EntrySeeInsert %W
}
@@ -210,6 +210,8 @@ bind Entry <Escape> {# nothing}
bind Entry <Return> {# nothing}
bind Entry <KP_Enter> {# nothing}
bind Entry <Tab> {# nothing}
+bind Entry <Prior> {# nothing}
+bind Entry <Next> {# nothing}
if {[tk windowingsystem] eq "aqua"} {
bind Entry <Command-KeyPress> {# nothing}
}