diff options
author | hobbs <hobbs> | 2001-11-13 00:19:05 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2001-11-13 00:19:05 (GMT) |
commit | e3690695eaccf83b8076fd877d17ed591c43065d (patch) | |
tree | 65c1489fbcc7a86e2140be2d55b1ffd0ccbd2577 /library/tk.tcl | |
parent | 3027f28d1f2411602324f0964f7f1ad28742cf93 (diff) | |
download | tk-e3690695eaccf83b8076fd877d17ed591c43065d.zip tk-e3690695eaccf83b8076fd877d17ed591c43065d.tar.gz tk-e3690695eaccf83b8076fd877d17ed591c43065d.tar.bz2 |
added TIP#26 text widget undo/redo functionality
Diffstat (limited to 'library/tk.tcl')
-rw-r--r-- | library/tk.tcl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/library/tk.tcl b/library/tk.tcl index 102ac4c..f62379b 100644 --- a/library/tk.tcl +++ b/library/tk.tcl @@ -3,7 +3,7 @@ # Initialization script normally executed in the interpreter for each # Tk-based application. Arranges class bindings for widgets. # -# RCS: @(#) $Id: tk.tcl,v 1.31 2001/08/01 16:21:11 dgp Exp $ +# RCS: @(#) $Id: tk.tcl,v 1.32 2001/11/13 00:19:05 hobbs Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -313,6 +313,8 @@ switch $::tcl_platform(platform) { event add <<Copy>> <Control-Key-c> <Key-F16> event add <<Paste>> <Control-Key-v> <Key-F18> event add <<PasteSelection>> <ButtonRelease-2> + event add <<Undo>> <Control-Key-z> + event add <<Redo>> <Control-Key-Z> # Some OS's define a goofy (as in, not <Shift-Tab>) keysym # that is returned when the user presses <Shift-Tab>. In order for # tab traversal to work, we have to add these keysyms to the @@ -337,6 +339,8 @@ switch $::tcl_platform(platform) { event add <<Copy>> <Control-Key-c> <Control-Key-Insert> event add <<Paste>> <Control-Key-v> <Shift-Key-Insert> event add <<PasteSelection>> <ButtonRelease-2> + event add <<Undo>> <Control-Key-z> + event add <<Redo>> <Control-Key-y> } "macintosh" { event add <<Cut>> <Control-Key-x> <Key-F2> @@ -344,6 +348,8 @@ switch $::tcl_platform(platform) { event add <<Paste>> <Control-Key-v> <Key-F4> event add <<PasteSelection>> <ButtonRelease-2> event add <<Clear>> <Clear> + event add <<Undo>> <Control-Key-z> + event add <<Redo>> <Control-Key-Z> } } # ---------------------------------------------------------------------- |