summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-08-11 08:36:58 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-08-11 08:36:58 (GMT)
commit37bbae810972820ec44d0ff5dab6bdf66117ef44 (patch)
tree7050d329d65766f1d5dff4afea7217752c1dcb40
parentb1389978ea8fdb2388386559c06247cb00ce48b1 (diff)
parent2b0aa341dd7556d42bd7ac7ebc11e6d767455775 (diff)
downloadtk-37bbae810972820ec44d0ff5dab6bdf66117ef44.zip
tk-37bbae810972820ec44d0ff5dab6bdf66117ef44.tar.gz
tk-37bbae810972820ec44d0ff5dab6bdf66117ef44.tar.bz2
[Bug 3555644]: Better use of virtual events.
Pre-define 10 new Virtual events, and correct various bindings according to the Mac OSX documentation.
-rw-r--r--ChangeLog6
-rw-r--r--doc/event.n48
-rw-r--r--library/console.tcl6
-rw-r--r--library/demos/entry3.tcl4
-rw-r--r--library/demos/items.tcl2
-rw-r--r--library/entry.tcl28
-rw-r--r--library/iconlist.tcl8
-rw-r--r--library/listbox.tcl24
-rw-r--r--library/menu.tcl8
-rw-r--r--library/scale.tcl20
-rw-r--r--library/scrlbar.tcl20
-rw-r--r--library/spinbox.tcl28
-rw-r--r--library/text.tcl76
-rw-r--r--library/tk.tcl119
-rw-r--r--library/ttk/entry.tcl10
-rw-r--r--library/ttk/scale.tcl23
-rw-r--r--win/makefile.vc74
-rw-r--r--win/rules.vc4
18 files changed, 248 insertions, 260 deletions
diff --git a/ChangeLog b/ChangeLog
index 7a24515..6bc9a8d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-08-11 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * library/*.tcl: [Bug 3555644]: Better use of virtual events.
+ Pre-define 10 new Virtual events, and correct various
+ bindings according to the Mac OSX documentation.
+
2012-08-11 Francois Vogel <fvogelnew1@free.fr>
* generic/tkTextTag.c: [Bug 3554273]: Test textDisp-32.2 failed
diff --git a/doc/event.n b/doc/event.n
index 214e6b7..f45a13f 100644
--- a/doc/event.n
+++ b/doc/event.n
@@ -373,6 +373,16 @@ selected contents.
Move to the next item (i.e., visible character) in the current widget while
deselecting any selected contents.
.TP
+\fB<<NextLine>>\fR
+.
+Move to the next line in the current widget while deselecting any selected
+contents.
+.TP
+\fB<<NextPara>>\fR
+.
+Move to the next paragraph in the current widget while deselecting any
+selected contents.
+.TP
\fB<<NextWord>>\fR
.
Move to the next group of items (i.e., visible word) in the current widget
@@ -391,6 +401,16 @@ event has meaningful \fB%x\fR and \fB%y\fR substitutions).
Move to the previous item (i.e., visible character) in the current widget
while deselecting any selected contents.
.TP
+\fB<<PrevLine>>\fR
+.
+Move to the previous line in the current widget while deselecting any selected
+contents.
+.TP
+\fB<<PrevPara>>\fR
+.
+Move to the previous paragraph in the current widget while deselecting any
+selected contents.
+.TP
\fB<<PrevWindow>>\fR
Traverse to the previous window.
.TP
@@ -402,6 +422,10 @@ while deselecting any selected contents.
\fB<<Redo>>\fR
Redo one undone action.
.TP
+\fB<<SelectAll>>\fR
+.
+Set the range of selected contents to the complete widget.
+.TP
\fB<<SelectLineEnd>>\fR
.
Move to the end of the line in the current widget while extending the range
@@ -417,16 +441,40 @@ of selected contents.
Move to the next item (i.e., visible character) in the current widget while
extending the range of selected contents.
.TP
+\fB<<SelectNextLine>>\fR
+.
+Move to the next line in the current widget while extending the range of
+selected contents.
+.TP
+\fB<<SelectNextPara>>\fR
+.
+Move to the next paragraph in the current widget while extending the range
+of selected contents.
+.TP
\fB<<SelectNextWord>>\fR
.
Move to the next group of items (i.e., visible word) in the current widget
while extending the range of selected contents.
.TP
+\fB<<SelectNone>>\fR
+.
+Reset the range of selected contents to be empty.
+.TP
\fB<<SelectPrevChar>>\fR
.
Move to the previous item (i.e., visible character) in the current widget
while extending the range of selected contents.
.TP
+\fB<<SelectPrevLine>>\fR
+.
+Move to the previous line in the current widget while extending the range of
+selected contents.
+.TP
+\fB<<SelectPrevPara>>\fR
+.
+Move to the previous paragraph in the current widget while extending the
+range of selected contents.
+.TP
\fB<<SelectPrevWord>>\fR
.
Move to the previous group of items (i.e., visible word) in the current widget
diff --git a/library/console.tcl b/library/console.tcl
index e6b7ce9..37832f2 100644
--- a/library/console.tcl
+++ b/library/console.tcl
@@ -499,18 +499,16 @@ proc ::tk::ConsoleBind {w} {
}
bind Console <Control-h> [bind Console <BackSpace>]
- bind Console <Home> {
+ bind Console <<LineStart>> {
if {[%W compare insert < promptEnd]} {
tk::TextSetCursor %W {insert linestart}
} else {
tk::TextSetCursor %W promptEnd
}
}
- bind Console <Control-a> [bind Console <Home>]
- bind Console <End> {
+ bind Console <<LineEnd>> {
tk::TextSetCursor %W {insert lineend}
}
- bind Console <Control-e> [bind Console <End>]
bind Console <Control-d> {
if {[%W compare insert < promptEnd]} {
break
diff --git a/library/demos/entry3.tcl b/library/demos/entry3.tcl
index 3d76c2e..d4435c6 100644
--- a/library/demos/entry3.tcl
+++ b/library/demos/entry3.tcl
@@ -169,8 +169,8 @@ bind $w.l3.e <FocusIn> {
after idle {%W selection clear}
}
}
-bind $w.l3.e <Left> {phoneSkipLeft %W}
-bind $w.l3.e <Right> {phoneSkipRight %W}
+bind $w.l3.e <<PrevChar>> {phoneSkipLeft %W}
+bind $w.l3.e <<NextChar>> {phoneSkipRight %W}
pack $w.l3.e -fill x -expand 1 -padx 1m -pady 1m
labelframe $w.l4 -text "Password Entry"
diff --git a/library/demos/items.tcl b/library/demos/items.tcl
index 31a1570..177e9a4 100644
--- a/library/demos/items.tcl
+++ b/library/demos/items.tcl
@@ -173,7 +173,7 @@ bind $c <2> "$c scan mark %x %y"
bind $c <B2-Motion> "$c scan dragto %x %y"
bind $c <3> "itemMark $c %x %y"
bind $c <B3-Motion> "itemStroke $c %x %y"
-bind $c <Control-f> "itemsUnderArea $c"
+bind $c <<NextChar>> "itemsUnderArea $c"
bind $c <1> "itemStartDrag $c %x %y"
bind $c <B1-Motion> "itemDrag $c %x %y"
diff --git a/library/entry.tcl b/library/entry.tcl
index de6c463..f28547e 100644
--- a/library/entry.tcl
+++ b/library/entry.tcl
@@ -185,10 +185,10 @@ bind Entry <Control-Shift-space> {
bind Entry <Shift-Select> {
%W selection adjust insert
}
-bind Entry <Control-slash> {
+bind Entry <<SelectAll>> {
%W selection range 0 end
}
-bind Entry <Control-backslash> {
+bind Entry <<SelectNone>> {
%W selection clear
}
bind Entry <KeyPress> {
@@ -214,8 +214,8 @@ if {[tk windowingsystem] eq "aqua"} {
bind Entry <Command-KeyPress> {# nothing}
}
# Tk-on-Cocoa generates characters for these two keys. [Bug 2971663]
-bind Entry <Down> {# nothing}
-bind Entry <Up> {# nothing}
+bind Entry <<NextLine>> {# nothing}
+bind Entry <<PrevLine>> {# nothing}
# On Windows, paste is done using Shift-Insert. Shift-Insert already
# generates the <<Paste>> event, so we don't need to do anything here.
@@ -227,31 +227,11 @@ if {[tk windowingsystem] ne "win32"} {
# Additional emacs-like bindings:
-bind Entry <Control-a> {
- if {!$tk_strictMotif} {
- tk::EntrySetCursor %W 0
- }
-}
-bind Entry <Control-b> {
- if {!$tk_strictMotif} {
- tk::EntrySetCursor %W [expr {[%W index insert] - 1}]
- }
-}
bind Entry <Control-d> {
if {!$tk_strictMotif} {
%W delete insert
}
}
-bind Entry <Control-e> {
- if {!$tk_strictMotif} {
- tk::EntrySetCursor %W end
- }
-}
-bind Entry <Control-f> {
- if {!$tk_strictMotif} {
- tk::EntrySetCursor %W [expr {[%W index insert] + 1}]
- }
-}
bind Entry <Control-h> {
if {!$tk_strictMotif} {
tk::EntryBackspace %W
diff --git a/library/iconlist.tcl b/library/iconlist.tcl
index fc8128d..ce1aae2 100644
--- a/library/iconlist.tcl
+++ b/library/iconlist.tcl
@@ -444,10 +444,10 @@ package require Tk 8.6
bind $canvas <Control-B1-Motion> {;}
bind $canvas <Shift-B1-Motion> [namespace code {my ShiftMotion1 %x %y}]
- bind $canvas <Up> [namespace code {my UpDown -1}]
- bind $canvas <Down> [namespace code {my UpDown 1}]
- bind $canvas <Left> [namespace code {my LeftRight -1}]
- bind $canvas <Right> [namespace code {my LeftRight 1}]
+ bind $canvas <<PrevLine>> [namespace code {my UpDown -1}]
+ bind $canvas <<NextLine>> [namespace code {my UpDown 1}]
+ bind $canvas <<PrevChar>> [namespace code {my LeftRight -1}]
+ bind $canvas <<NextChar>> [namespace code {my LeftRight 1}]
bind $canvas <Return> [namespace code {my ReturnKey}]
bind $canvas <KeyPress> [namespace code {my KeyPress %A}]
bind $canvas <Control-KeyPress> ";"
diff --git a/library/listbox.tcl b/library/listbox.tcl
index c7dd32e..01fb03d 100644
--- a/library/listbox.tcl
+++ b/library/listbox.tcl
@@ -69,28 +69,28 @@ bind Listbox <B1-Enter> {
tk::CancelRepeat
}
-bind Listbox <Up> {
+bind Listbox <<PrevLine>> {
tk::ListboxUpDown %W -1
}
-bind Listbox <Shift-Up> {
+bind Listbox <<SelectPrevLine>> {
tk::ListboxExtendUpDown %W -1
}
-bind Listbox <Down> {
+bind Listbox <<NextLine>> {
tk::ListboxUpDown %W 1
}
-bind Listbox <Shift-Down> {
+bind Listbox <<SelectNextLine>> {
tk::ListboxExtendUpDown %W 1
}
-bind Listbox <Left> {
+bind Listbox <<PrevChar>> {
%W xview scroll -1 units
}
-bind Listbox <Control-Left> {
+bind Listbox <<PrevWord>> {
%W xview scroll -1 pages
}
-bind Listbox <Right> {
+bind Listbox <<NextChar>> {
%W xview scroll 1 units
}
-bind Listbox <Control-Right> {
+bind Listbox <<NextWord>> {
%W xview scroll 1 pages
}
bind Listbox <Prior> {
@@ -107,10 +107,10 @@ bind Listbox <Control-Prior> {
bind Listbox <Control-Next> {
%W xview scroll 1 pages
}
-bind Listbox <Home> {
+bind Listbox <<LineStart>> {
%W xview moveto 0
}
-bind Listbox <End> {
+bind Listbox <<LineEnd>> {
%W xview moveto 1
}
bind Listbox <Control-Home> {
@@ -154,10 +154,10 @@ bind Listbox <Shift-Select> {
bind Listbox <Escape> {
tk::ListboxCancel %W
}
-bind Listbox <Control-slash> {
+bind Listbox <<SelectAll>> {
tk::ListboxSelectAll %W
}
-bind Listbox <Control-backslash> {
+bind Listbox <<SelectNone>> {
if {[%W cget -selectmode] ne "browse"} {
%W selection clear 0 end
event generate %W <<ListboxSelect>>
diff --git a/library/menu.tcl b/library/menu.tcl
index cc57532..a51c96f 100644
--- a/library/menu.tcl
+++ b/library/menu.tcl
@@ -149,16 +149,16 @@ bind Menu <Return> {
bind Menu <Escape> {
tk::MenuEscape %W
}
-bind Menu <Left> {
+bind Menu <<PrevChar>> {
tk::MenuLeftArrow %W
}
-bind Menu <Right> {
+bind Menu <<NextChar>> {
tk::MenuRightArrow %W
}
-bind Menu <Up> {
+bind Menu <<PrevLine>> {
tk::MenuUpArrow %W
}
-bind Menu <Down> {
+bind Menu <<NextLine>> {
tk::MenuDownArrow %W
}
bind Menu <KeyPress> {
diff --git a/library/scale.tcl b/library/scale.tcl
index b4da824..d9e7d27 100644
--- a/library/scale.tcl
+++ b/library/scale.tcl
@@ -71,34 +71,34 @@ if {[tk windowingsystem] eq "win32"} {
bind Scale <Control-1> {
tk::ScaleControlPress %W %x %y
}
-bind Scale <Up> {
+bind Scale <<PrevLine>> {
tk::ScaleIncrement %W up little noRepeat
}
-bind Scale <Down> {
+bind Scale <<NextLine>> {
tk::ScaleIncrement %W down little noRepeat
}
-bind Scale <Left> {
+bind Scale <<PrevChar>> {
tk::ScaleIncrement %W up little noRepeat
}
-bind Scale <Right> {
+bind Scale <<NextChar>> {
tk::ScaleIncrement %W down little noRepeat
}
-bind Scale <Control-Up> {
+bind Scale <<PrevPara>> {
tk::ScaleIncrement %W up big noRepeat
}
-bind Scale <Control-Down> {
+bind Scale <<NextPara>> {
tk::ScaleIncrement %W down big noRepeat
}
-bind Scale <Control-Left> {
+bind Scale <<PrevWord>> {
tk::ScaleIncrement %W up big noRepeat
}
-bind Scale <Control-Right> {
+bind Scale <<NextWord>> {
tk::ScaleIncrement %W down big noRepeat
}
-bind Scale <Home> {
+bind Scale <<LineStart>> {
%W set [%W cget -from]
}
-bind Scale <End> {
+bind Scale <<LineEnd>> {
%W set [%W cget -to]
}
diff --git a/library/scrlbar.tcl b/library/scrlbar.tcl
index 9277160..1f8c7d2 100644
--- a/library/scrlbar.tcl
+++ b/library/scrlbar.tcl
@@ -91,28 +91,28 @@ bind Scrollbar <Control-2> {
tk::ScrollTopBottom %W %x %y
}
-bind Scrollbar <Up> {
+bind Scrollbar <<PrevLine>> {
tk::ScrollByUnits %W v -1
}
-bind Scrollbar <Down> {
+bind Scrollbar <<NextLine>> {
tk::ScrollByUnits %W v 1
}
-bind Scrollbar <Control-Up> {
+bind Scrollbar <<PrevPara>> {
tk::ScrollByPages %W v -1
}
-bind Scrollbar <Control-Down> {
+bind Scrollbar <<NextPara>> {
tk::ScrollByPages %W v 1
}
-bind Scrollbar <Left> {
+bind Scrollbar <<PrevChar>> {
tk::ScrollByUnits %W h -1
}
-bind Scrollbar <Right> {
+bind Scrollbar <<NextChar>> {
tk::ScrollByUnits %W h 1
}
-bind Scrollbar <Control-Left> {
+bind Scrollbar <<PrevWord>> {
tk::ScrollByPages %W h -1
}
-bind Scrollbar <Control-Right> {
+bind Scrollbar <<NextWord>> {
tk::ScrollByPages %W h 1
}
bind Scrollbar <Prior> {
@@ -121,10 +121,10 @@ bind Scrollbar <Prior> {
bind Scrollbar <Next> {
tk::ScrollByPages %W hv 1
}
-bind Scrollbar <Home> {
+bind Scrollbar <<LineStart>> {
tk::ScrollToPos %W 0
}
-bind Scrollbar <End> {
+bind Scrollbar <<LineEnd>> {
tk::ScrollToPos %W 1
}
}
diff --git a/library/spinbox.tcl b/library/spinbox.tcl
index 20b477a..06c002c 100644
--- a/library/spinbox.tcl
+++ b/library/spinbox.tcl
@@ -120,10 +120,10 @@ bind Spinbox <Control-1> {
%W icursor @%x
}
-bind Spinbox <Up> {
+bind Spinbox <<PrevLine>> {
%W invoke buttonup
}
-bind Spinbox <Down> {
+bind Spinbox <<NextLine>> {
%W invoke buttondown
}
@@ -193,10 +193,10 @@ bind Spinbox <Control-Shift-space> {
bind Spinbox <Shift-Select> {
%W selection adjust insert
}
-bind Spinbox <Control-slash> {
+bind Spinbox <<SelectAll>> {
%W selection range 0 end
}
-bind Spinbox <Control-backslash> {
+bind Spinbox <<SelectNone>> {
%W selection clear
}
bind Spinbox <KeyPress> {
@@ -231,31 +231,11 @@ if {[tk windowingsystem] ne "win32"} {
# Additional emacs-like bindings:
-bind Spinbox <Control-a> {
- if {!$tk_strictMotif} {
- ::tk::EntrySetCursor %W 0
- }
-}
-bind Spinbox <Control-b> {
- if {!$tk_strictMotif} {
- ::tk::EntrySetCursor %W [expr {[%W index insert] - 1}]
- }
-}
bind Spinbox <Control-d> {
if {!$tk_strictMotif} {
%W delete insert
}
}
-bind Spinbox <Control-e> {
- if {!$tk_strictMotif} {
- ::tk::EntrySetCursor %W end
- }
-}
-bind Spinbox <Control-f> {
- if {!$tk_strictMotif} {
- ::tk::EntrySetCursor %W [expr {[%W index insert] + 1}]
- }
-}
bind Spinbox <Control-h> {
if {!$tk_strictMotif} {
::tk::EntryBackspace %W
diff --git a/library/text.tcl b/library/text.tcl
index 8a72152..e59a86e 100644
--- a/library/text.tcl
+++ b/library/text.tcl
@@ -92,10 +92,10 @@ bind Text <<PrevChar>> {
bind Text <<NextChar>> {
tk::TextSetCursor %W insert+1displayindices
}
-bind Text <Up> {
+bind Text <<PrevLine>> {
tk::TextSetCursor %W [tk::TextUpDownLine %W -1]
}
-bind Text <Down> {
+bind Text <<NextLine>> {
tk::TextSetCursor %W [tk::TextUpDownLine %W 1]
}
bind Text <<SelectPrevChar>> {
@@ -104,10 +104,10 @@ bind Text <<SelectPrevChar>> {
bind Text <<SelectNextChar>> {
tk::TextKeySelect %W [%W index {insert + 1displayindices}]
}
-bind Text <Shift-Up> {
+bind Text <<SelectPrevLine>> {
tk::TextKeySelect %W [tk::TextUpDownLine %W -1]
}
-bind Text <Shift-Down> {
+bind Text <<SelectNextLine>> {
tk::TextKeySelect %W [tk::TextUpDownLine %W 1]
}
bind Text <<PrevWord>> {
@@ -116,10 +116,10 @@ bind Text <<PrevWord>> {
bind Text <<NextWord>> {
tk::TextSetCursor %W [tk::TextNextWord %W insert]
}
-bind Text <Control-Up> {
+bind Text <<PrevPara>> {
tk::TextSetCursor %W [tk::TextPrevPara %W insert]
}
-bind Text <Control-Down> {
+bind Text <<NextPara>> {
tk::TextSetCursor %W [tk::TextNextPara %W insert]
}
bind Text <<SelectPrevWord>> {
@@ -128,10 +128,10 @@ bind Text <<SelectPrevWord>> {
bind Text <<SelectNextWord>> {
tk::TextKeySelect %W [tk::TextNextWord %W insert]
}
-bind Text <Control-Shift-Up> {
+bind Text <<SelectPrevPara>> {
tk::TextKeySelect %W [tk::TextPrevPara %W insert]
}
-bind Text <Control-Shift-Down> {
+bind Text <<SelectNextPara>> {
tk::TextKeySelect %W [tk::TextNextPara %W insert]
}
bind Text <Prior> {
@@ -240,10 +240,10 @@ bind Text <Shift-Select> {
set tk::Priv(selectMode) char
tk::TextKeyExtend %W insert
}
-bind Text <Control-slash> {
+bind Text <<SelectAll>> {
%W tag add sel 1.0 end
}
-bind Text <Control-backslash> {
+bind Text <<SelectNone>> {
%W tag remove sel 1.0 end
}
bind Text <<Cut>> {
@@ -287,31 +287,11 @@ if {[tk windowingsystem] eq "aqua"} {
# Additional emacs-like bindings:
-bind Text <Control-a> {
- if {!$tk_strictMotif} {
- tk::TextSetCursor %W {insert display linestart}
- }
-}
-bind Text <Control-b> {
- if {!$tk_strictMotif} {
- tk::TextSetCursor %W insert-1displayindices
- }
-}
bind Text <Control-d> {
if {!$tk_strictMotif && [%W compare end != insert+1c]} {
%W delete insert
}
}
-bind Text <Control-e> {
- if {!$tk_strictMotif} {
- tk::TextSetCursor %W {insert display lineend}
- }
-}
-bind Text <Control-f> {
- if {!$tk_strictMotif} {
- tk::TextSetCursor %W insert+1displayindices
- }
-}
bind Text <Control-k> {
if {!$tk_strictMotif && [%W compare end != insert+1c]} {
if {[%W compare insert == {insert lineend}]} {
@@ -321,22 +301,12 @@ bind Text <Control-k> {
}
}
}
-bind Text <Control-n> {
- if {!$tk_strictMotif} {
- tk::TextSetCursor %W [tk::TextUpDownLine %W 1]
- }
-}
bind Text <Control-o> {
if {!$tk_strictMotif} {
%W insert insert \n
%W mark set insert insert-1c
}
}
-bind Text <Control-p> {
- if {!$tk_strictMotif} {
- tk::TextSetCursor %W [tk::TextUpDownLine %W -1]
- }
-}
bind Text <Control-t> {
if {!$tk_strictMotif} {
tk::TextTranspose %W
@@ -390,31 +360,7 @@ bind Text <Meta-Delete> {
# Macintosh only bindings:
if {[tk windowingsystem] eq "aqua"} {
-bind Text <Option-Left> {
- tk::TextSetCursor %W [tk::TextPrevPos %W insert tcl_startOfPreviousWord]
-}
-bind Text <Option-Right> {
- tk::TextSetCursor %W [tk::TextNextWord %W insert]
-}
-bind Text <Option-Up> {
- tk::TextSetCursor %W [tk::TextPrevPara %W insert]
-}
-bind Text <Option-Down> {
- tk::TextSetCursor %W [tk::TextNextPara %W insert]
-}
-bind Text <Shift-Option-Left> {
- tk::TextKeySelect %W [tk::TextPrevPos %W insert tcl_startOfPreviousWord]
-}
-bind Text <Shift-Option-Right> {
- tk::TextKeySelect %W [tk::TextNextWord %W insert]
-}
-bind Text <Shift-Option-Up> {
- tk::TextKeySelect %W [tk::TextPrevPara %W insert]
-}
-bind Text <Shift-Option-Down> {
- tk::TextKeySelect %W [tk::TextNextPara %W insert]
-}
-bind Text <Control-v> {
+bind Text <<Paste>> {
tk::TextScrollPages %W 1
}
diff --git a/library/tk.tcl b/library/tk.tcl
index 2520d12..1a42aea 100644
--- a/library/tk.tcl
+++ b/library/tk.tcl
@@ -307,9 +307,9 @@ proc ::tk::EventMotifBindings {n1 dummy dummy} {
set op add
}
- event $op <<Cut>> <Control-Key-w>
- event $op <<Copy>> <Meta-Key-w>
- event $op <<Paste>> <Control-Key-y>
+ event $op <<Cut>> <Control-Key-w> <Shift-Key-Delete>
+ event $op <<Copy>> <Meta-Key-w> <Control-Key-Insert>
+ event $op <<Paste>> <Control-Key-y> <Shift-Key-Insert>
event $op <<Undo>> <Control-underscore>
}
@@ -358,29 +358,39 @@ if {![llength [info command tk_chooseDirectory]]} {
switch -exact -- [tk windowingsystem] {
"x11" {
- event add <<Cut>> <Control-Key-x> <Key-F20> <Control-Lock-Key-X>
- event add <<Copy>> <Control-Key-c> <Key-F16> <Control-Lock-Key-C>
- event add <<Paste>> <Control-Key-v> <Key-F18> <Control-Lock-Key-V>
- event add <<PasteSelection>> <ButtonRelease-2>
- event add <<Undo>> <Control-Key-z> <Control-Lock-Key-Z>
- event add <<Redo>> <Control-Key-Z> <Control-Lock-Key-z>
- event add <<ContextMenu>> <Button-3>
+ event add <<Cut>> <Control-Key-x> <Key-F20> <Control-Lock-Key-X>
+ event add <<Copy>> <Control-Key-c> <Key-F16> <Control-Lock-Key-C>
+ event add <<Paste>> <Control-Key-v> <Key-F18> <Control-Lock-Key-V>
+ event add <<PasteSelection>> <ButtonRelease-2>
+ event add <<Undo>> <Control-Key-z> <Control-Lock-Key-Z>
+ event add <<Redo>> <Control-Key-Z> <Control-Lock-Key-z>
+ event add <<ContextMenu>> <Button-3>
if {[info exists tcl_platform(os)] && $tcl_platform(os) eq "Darwin"} {
- event add <<ContextMenu>> <Button-2>
+ event add <<ContextMenu>> <Button-2>
}
- event add <<NextChar>> <Right>
- event add <<SelectNextChar>> <Shift-Right>
- event add <<PrevChar>> <Left>
- event add <<SelectPrevChar>> <Shift-Left>
+ event add <<SelectAll>> <Control-Key-slash>
+ event add <<SelectNone>> <Control-Key-backslash>
+ event add <<NextChar>> <Right> <Control-Key-f> <Control-Lock-Key-F>
+ event add <<SelectNextChar>> <Shift-Right> <Control-Key-F> <Control-Lock-Key-f>
+ event add <<PrevChar>> <Left> <Control-Key-b> <Control-Lock-Key-B>
+ event add <<SelectPrevChar>> <Shift-Left> <Control-Key-B> <Control-Lock-Key-b>
event add <<NextWord>> <Control-Right>
event add <<SelectNextWord>> <Control-Shift-Right>
event add <<PrevWord>> <Control-Left>
event add <<SelectPrevWord>> <Control-Shift-Left>
- event add <<LineStart>> <Home>
- event add <<SelectLineStart>> <Shift-Home>
- event add <<LineEnd>> <End>
- event add <<SelectLineEnd>> <Shift-End>
+ event add <<LineStart>> <Home> <Control-Key-a> <Control-Lock-Key-A>
+ event add <<SelectLineStart>> <Shift-Home> <Control-Key-A> <Control-Lock-Key-a>
+ event add <<LineEnd>> <End> <Control-Key-e> <Control-Lock-Key-E>
+ event add <<SelectLineEnd>> <Shift-End> <Control-Key-E> <Control-Lock-Key-e>
+ event add <<PrevLine>> <Up> <Control-Key-p> <Control-Lock-Key-P>
+ event add <<NextLine>> <Down> <Control-Key-n> <Control-Lock-Key-N>
+ event add <<SelectPrevLine>> <Shift-Up> <Control-Key-P> <Control-Lock-Key-p>
+ event add <<SelectNextLine>> <Shift-Down> <Control-Key-N> <Control-Lock-Key-n>
+ event add <<PrevPara>> <Control-Up>
+ event add <<NextPara>> <Control-Down>
+ event add <<SelectPrevPara>> <Control-Shift-Up>
+ event add <<SelectPrevPara>> <Control-Shift-Down>
# 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
@@ -399,17 +409,16 @@ switch -exact -- [tk windowingsystem] {
set ::tk::AlwaysShowSelection 1
}
"win32" {
- event add <<Cut>> <Control-Key-x> <Shift-Key-Delete> \
- <Control-Lock-Key-X>
- event add <<Copy>> <Control-Key-c> <Control-Key-Insert> \
- <Control-Lock-Key-C>
- event add <<Paste>> <Control-Key-v> <Shift-Key-Insert> \
- <Control-Lock-Key-V>
- event add <<PasteSelection>> <ButtonRelease-2>
- event add <<Undo>> <Control-Key-z> <Control-Lock-Key-Z>
- event add <<Redo>> <Control-Key-y> <Control-Lock-Key-Y>
- event add <<ContextMenu>> <Button-3>
-
+ event add <<Cut>> <Control-Key-x> <Shift-Key-Delete> <Control-Lock-Key-X>
+ event add <<Copy>> <Control-Key-c> <Control-Key-Insert> <Control-Lock-Key-C>
+ event add <<Paste>> <Control-Key-v> <Shift-Key-Insert> <Control-Lock-Key-V>
+ event add <<PasteSelection>> <ButtonRelease-2>
+ event add <<Undo>> <Control-Key-z> <Control-Lock-Key-Z>
+ event add <<Redo>> <Control-Key-y> <Control-Lock-Key-Y>
+ event add <<ContextMenu>> <Button-3>
+
+ event add <<SelectAll>> <Control-Key-slash>
+ event add <<SelectNone>> <Control-Key-backslash>
event add <<NextChar>> <Right>
event add <<SelectNextChar>> <Shift-Right>
event add <<PrevChar>> <Left>
@@ -418,37 +427,55 @@ switch -exact -- [tk windowingsystem] {
event add <<SelectNextWord>> <Control-Shift-Right>
event add <<PrevWord>> <Control-Left>
event add <<SelectPrevWord>> <Control-Shift-Left>
- event add <<LineStart>> <Home>
+ event add <<LineStart>> <Home> <Control-Key-a> <Control-Lock-Key-A>
event add <<SelectLineStart>> <Shift-Home>
- event add <<LineEnd>> <End>
+ event add <<LineEnd>> <End> <Control-Key-e> <Control-Lock-Key-E>
event add <<SelectLineEnd>> <Shift-End>
+ event add <<PrevLine>> <Up>
+ event add <<NextLine>> <Down>
+ event add <<SelectPrevLine>> <Shift-Up>
+ event add <<SelectNextLine>> <Shift-Down>
+ event add <<PrevPara>> <Control-Up>
+ event add <<NextPara>> <Control-Down>
+ event add <<SelectPrevPara>> <Control-Shift-Up>
+ event add <<SelectPrevPara>> <Control-Shift-Down>
}
"aqua" {
- event add <<Cut>> <Command-Key-x> <Key-F2> <Control-Lock-Key-X>
- event add <<Copy>> <Command-Key-c> <Key-F3> <Control-Lock-Key-C>
- event add <<Paste>> <Command-Key-v> <Key-F4> <Control-Lock-Key-V>
- event add <<PasteSelection>> <ButtonRelease-2>
- event add <<Clear>> <Clear>
- event add <<Undo>> <Command-Key-z> <Control-Lock-Key-Z>
- event add <<Redo>> <Command-Key-y> <Control-Lock-Key-Y>
- event add <<ContextMenu>> <Button-2>
+ event add <<Cut>> <Command-Key-x> <Key-F2> <Control-Lock-Key-X>
+ event add <<Copy>> <Command-Key-c> <Key-F3> <Control-Lock-Key-C>
+ event add <<Paste>> <Command-Key-v> <Key-F4> <Control-Lock-Key-V>
+ event add <<PasteSelection>> <ButtonRelease-2>
+ event add <<Clear>> <Clear>
+ event add <<ContextMenu>> <Button-2>
# Official bindings
# See http://support.apple.com/kb/HT1343
- event add <<NextChar>> <Right>
+ event add <<SelectAll>> <Command-Key-a>
+ event add <<SelectNone>> <Option-Command-Key-a>
+ event add <<Undo>> <Command-Key-z> <Control-Lock-Key-Z>
+ event add <<Redo>> <Command-Key-Z> <Control-Lock-Key-z>
+ event add <<NextChar>> <Right> <Control-Key-f> <Control-Lock-Key-F>
event add <<SelectNextChar>> <Shift-Right>
- event add <<PrevChar>> <Left>
+ event add <<PrevChar>> <Left> <Control-Key-b> <Control-Lock-Key-B>
event add <<SelectPrevChar>> <Shift-Left>
event add <<NextWord>> <Option-Right>
event add <<SelectNextWord>> <Shift-Option-Right>
event add <<PrevWord>> <Option-Left>
event add <<SelectPrevWord>> <Shift-Option-Left>
- event add <<SelectLineStart>> <Shift-Home> <Shift-Command-Left>
- event add <<SelectLineEnd>> <Shift-End> <Shift-Command-Right>
+ event add <<LineStart>> <Home> <Command-Left> <Control-Key-a> <Control-Lock-Key-A>
+ event add <<SelectLineStart>> <Shift-Home> <Shift-Command-Left> <Control-Key-A> <Control-Lock-Key-a>
+ event add <<LineEnd>> <End> <Command-Right> <Control-Key-e> <Control-Lock-Key-E>
+ event add <<SelectLineEnd>> <Shift-End> <Shift-Command-Right> <Control-Key-E> <Control-Lock-Key-e>
+ event add <<PrevLine>> <Up> <Control-Key-p> <Control-Lock-Key-P>
+ event add <<SelectPrevLine>> <Shift-Up> <Control-Key-P> <Control-Lock-Key-p>
+ event add <<NextLine>> <Down> <Control-Key-n> <Control-Lock-Key-N>
+ event add <<SelectNextLine>> <Shift-Down> <Control-Key-N> <Control-Lock-Key-n>
# Not official, but logical extensions of above. Also derived from
# bindings present in MS Word on OSX.
- event add <<LineStart>> <Home> <Command-Left>
- event add <<LineEnd>> <End> <Command-Right>
+ event add <<PrevPara>> <Option-Up>
+ event add <<NextPara>> <Option-Down>
+ event add <<SelectPrevPara>> <Shift-Option-Up>
+ event add <<SelectPrevPara>> <Shift-Option-Down>
}
}
diff --git a/library/ttk/entry.tcl b/library/ttk/entry.tcl
index a27921a..22c4115 100644
--- a/library/ttk/entry.tcl
+++ b/library/ttk/entry.tcl
@@ -107,8 +107,8 @@ bind TEntry <<SelectNextWord>> { ttk::entry::Extend %W nextword }
bind TEntry <<SelectLineStart>> { ttk::entry::Extend %W home }
bind TEntry <<SelectLineEnd>> { ttk::entry::Extend %W end }
-bind TEntry <Control-Key-slash> { %W selection range 0 end }
-bind TEntry <Control-Key-backslash> { %W selection clear }
+bind TEntry <<SelectAll>> { %W selection range 0 end }
+bind TEntry <<SelectNone>> { %W selection clear }
bind TEntry <<TraverseIn>> { %W selection range 0 end; %W icursor end }
@@ -136,15 +136,13 @@ if {[tk windowingsystem] eq "aqua"} {
bind TEntry <Command-KeyPress> {# nothing}
}
# Tk-on-Cocoa generates characters for these two keys. [Bug 2971663]
-bind TEntry <Down> {# nothing}
-bind TEntry <Up> {# nothing}
+bind TEntry <<PrevLine>> {# nothing}
+bind TEntry <<NextLine>> {# nothing}
## Additional emacs-like bindings:
#
-bind TEntry <Control-Key-a> { ttk::entry::Move %W home }
bind TEntry <Control-Key-b> { ttk::entry::Move %W prevchar }
bind TEntry <Control-Key-d> { ttk::entry::Delete %W }
-bind TEntry <Control-Key-e> { ttk::entry::Move %W end }
bind TEntry <Control-Key-f> { ttk::entry::Move %W nextchar }
bind TEntry <Control-Key-h> { ttk::entry::Backspace %W }
bind TEntry <Control-Key-k> { %W delete insert end }
diff --git a/library/ttk/scale.tcl b/library/ttk/scale.tcl
index 23d08ed..69b9dd8 100644
--- a/library/ttk/scale.tcl
+++ b/library/ttk/scale.tcl
@@ -21,16 +21,19 @@ bind TScale <ButtonPress-3> { ttk::scale::Jump %W %x %y }
bind TScale <B3-Motion> { ttk::scale::Drag %W %x %y }
bind TScale <ButtonRelease-3> { ttk::scale::Release %W %x %y }
-bind TScale <Left> { ttk::scale::Increment %W -1 }
-bind TScale <Up> { ttk::scale::Increment %W -1 }
-bind TScale <Right> { ttk::scale::Increment %W 1 }
-bind TScale <Down> { ttk::scale::Increment %W 1 }
-bind TScale <Control-Left> { ttk::scale::Increment %W -10 }
-bind TScale <Control-Up> { ttk::scale::Increment %W -10 }
-bind TScale <Control-Right> { ttk::scale::Increment %W 10 }
-bind TScale <Control-Down> { ttk::scale::Increment %W 10 }
-bind TScale <Home> { %W set [%W cget -from] }
-bind TScale <End> { %W set [%W cget -to] }
+## Keyboard navigation bindings:
+#
+bind TScale <<LineStart>> { %W set [%W cget -from] }
+bind TScale <<LineEnd>> { %W set [%W cget -to] }
+
+bind TScale <<PrevChar>> { ttk::scale::Increment %W -1 }
+bind TScale <<PrevLine>> { ttk::scale::Increment %W -1 }
+bind TScale <<NextChar>> { ttk::scale::Increment %W 1 }
+bind TScale <<NextLine>> { ttk::scale::Increment %W 1 }
+bind TScale <<PrevWord>> { ttk::scale::Increment %W -10 }
+bind TScale <<PrevPara>> { ttk::scale::Increment %W -10 }
+bind TScale <<NextWord>> { ttk::scale::Increment %W 10 }
+bind TScale <<NextPara>> { ttk::scale::Increment %W 10 }
proc ttk::scale::Press {w x y} {
variable State
diff --git a/win/makefile.vc b/win/makefile.vc
index 7bacfd3..8557923 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -42,17 +42,17 @@ the build instructions.
# turn on the 64-bit compiler, if your SDK has it.
#
# 3) Targets are:
-# release -- builds the core, the shell. (default)
+# release -- Builds the core, the shell. (default)
# core -- Only builds the core.
-# all -- builds everything.
-# test -- builds and runs the test suite.
-# tktest -- just builds the binaries for the test suite.
-# install -- installs the built binaries and libraries to $(INSTALLDIR)
+# all -- Builds everything.
+# test -- Builds and runs the test suite.
+# tktest -- Just builds the binaries for the test suite.
+# install -- Installs the built binaries and libraries to $(INSTALLDIR)
# as the root of the install tree.
-# cwish -- builds a console version of wish.
-# clean -- removes the contents of $(TMP_DIR)
-# hose -- removes the contents of $(TMP_DIR) and $(OUT_DIR)
-# genstubs -- rebuilds the Stubs table and support files (dev only).
+# cwish -- Builds a console version of wish.
+# clean -- Removes the contents of $(TMP_DIR)
+# hose -- Removes the contents of $(TMP_DIR) and $(OUT_DIR)
+# genstubs -- Rebuilds the Stubs table and support files (dev only).
# depend -- Generates an accurate set of source dependancies for this
# makefile. Helpful to avoid problems when the sources are
# refreshed and you rebuild, but can "overbuild" when common
@@ -71,34 +71,36 @@ the build instructions.
# Sets where to install Tcl from the built binaries.
# C:\Progra~1\Tcl is assumed when not specified.
#
-# OPTS=static,msvcrt,linkexten,threads,symbols,profile,unchecked,none
+# OPTS=loimpact,msvcrt,nothreads,noxp,pdbs,profile,square,static,staticpkg,symbols,unchecked,none
# Sets special options for the core. The default is for none.
# Any combination of the above may be used (comma separated).
# 'none' will over-ride everything to nothing.
#
-# static = Builds a static library of the core instead of a
-# dll. The shell will be static (and large), as well.
-# msvcrt = Effects the static option only to switch it from
+# loimpact = Adds a flag for how NT treats the heap to keep memory
+# in use, low. This is said to impact alloc performance.
+# msvcrt = Affects the static option only to switch it from
# using libcmt(d) as the C runtime [by default] to
# msvcrt(d). This is useful for static embedding
# support.
-# staticpkg= Affects the static option only to switch wishXX.exe
-# to have the dde and reg extension linked inside it.
-# threads = Turns on full multithreading support.
+# nothreads = Turns off full multithreading support.
+# noxp = If you do not have the uxtheme.h header then you
+# cannot include support for XP themeing.
+# square = Include the demo square widget.
+# static = Builds a static library of the core instead of a
+# dll. The shell will be static (and large), as well.
+# staticpkg = Affects the static option only to switch
+# wishXX.exe to have the dde and reg extension linked
+# inside it.
+# pdbs = Build detached symbols for release builds.
+# profile = Adds profiling hooks. Map file is assumed.
# thrdalloc = Use the thread allocator (shared global free pool)
# This is the default on threaded builds.
-# tclalloc = Use the old non-thread allocator
-# symbols = Adds symbols for step debugging.
-# profile = Adds profiling hooks. Map file is assumed.
-# loimpact = Adds a flag for how NT treats the heap to keep
-# memory in use, low. This is said to impact alloc
-# performance.
-# unchecked= Allows a symbols build to not use the debug
+# tclalloc = Use the old non-thread allocator
+# symbols = Debug build. Links to the debug C runtime, disables
+# optimizations and creates pdb symbols files.
+# unchecked = Allows a symbols build to not use the debug
# enabled runtime (msvcrt.dll not msvcrtd.dll
# or libcmt.lib not libcmtd.lib).
-# noxp = If you do not have the uxtheme.h header then you
-# cannot include support for XP themeing.
-# square = Include the demo square widget.
#
# STATS=memdbg,compdbg,none
# Sets optional memory and bytecode compiler debugging code added
@@ -109,15 +111,16 @@ the build instructions.
# memdbg = Enables the debugging memory allocator.
# compdbg = Enables byte compilation logging.
#
-# CHECKS=nodep,fullwarn,none
+# CHECKS=nodep,fullwarn,64bit,none
# Sets special macros for checking compatability.
#
# nodep = Turns off compatability macros to ensure Tk isn't
# being built with deprecated functions.
# fullwarn = Builds with full compiler and link warnings enabled.
# Very verbose.
+# 64bit = Enable 64bit portability warnings (if available)
#
-# MACHINE=(IX86|IA64|AMD64|ALPHA)
+# MACHINE=(ALPHA|AMD64|IA64|IX86)
# Set the machine type used for the compiler, linker, and
# resource compiler. This hook is needed to tell the tools
# when alternate platforms are requested. IX86 is the default
@@ -205,8 +208,8 @@ TTK_SQUARE_WIDGET = 0
STUBPREFIX = $(PROJECT)stub
WISHNAMEPREFIX = wish
-BINROOT = .
-ROOT = ..
+BINROOT = $(MAKEDIR) # originally .
+ROOT = $(MAKEDIR)\.. # originally ..
TK_LIBRARY = $(ROOT)\library
@@ -664,9 +667,8 @@ $(CAT32): $(_TCLDIR)\win\cat.c
$(link32) $(conlflags) -out:$@ -stack:16384 $(TMP_DIR)\cat.obj $(baselibs)
$(_VC_MANIFEST_EMBED_EXE)
-
#---------------------------------------------------------------------
-# Regenerate the stubs files.
+# Regenerate the stubs files. [Development use only]
#---------------------------------------------------------------------
genstubs:
@@ -731,8 +733,8 @@ CreateButton(3, "Wiki", ExecFile("http://wiki.tcl.tk"))
CreateButton(4, "FAQ", ExecFile("http://www.purl.org/NET/Tcl-FAQ/"))
<<
cd $(MAKEDIR)
- $(CPY) "$(DOCTMP_DIR)\$(@B).hlp" "$(OUT_DIR)"
- $(CPY) "$(DOCTMP_DIR)\$(@B).cnt" "$(OUT_DIR)"
+ @$(CPY) "$(DOCTMP_DIR)\$(@B).hlp" "$(OUT_DIR)"
+ @$(CPY) "$(DOCTMP_DIR)\$(@B).cnt" "$(OUT_DIR)"
$(MAN2TCL): $(TCLTOOLSDIR)\$$(@B).c
$(cc32) $(TK_CFLAGS) -Fo$(@D)\ $(TCLTOOLSDIR)\$(@B).c
@@ -831,7 +833,7 @@ $(TKOBJS)
#---------------------------------------------------------------------
-# Dedependency rules
+# Dependency rules
#---------------------------------------------------------------------
$(TMP_DIR)\tk.res: \
@@ -841,7 +843,7 @@ $(TMP_DIR)\tk.res: \
!if exist("$(OUT_DIR)\depend.mk")
!include "$(OUT_DIR)\depend.mk"
-!message *** Dependency rules in effect.
+!message *** Dependency rules in use.
!else
!message *** Dependency rules are not being used.
!endif
diff --git a/win/rules.vc b/win/rules.vc
index f2ee135..3fbaaaf 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -598,7 +598,7 @@ TCLSTUBLIB = "$(_TCLDIR)\lib\tclstub$(TCL_VERSION).lib"
TCLIMPLIB = "$(_TCLDIR)\lib\tcl$(TCL_VERSION)$(SUFX).lib"
TCL_LIBRARY = $(_TCLDIR)\lib
TCLREGLIB = "$(_TCLDIR)\lib\tclreg13$(SUFX:t=).lib"
-TCLDDELIB = "$(_TCLDIR)\lib\tcldde13$(SUFX:t=).lib"
+TCLDDELIB = "$(_TCLDIR)\lib\tcldde14$(SUFX:t=).lib"
COFFBASE = \must\have\tcl\sources\to\build\this\target
TCLTOOLSDIR = \must\have\tcl\sources\to\build\this\target
TCL_INCLUDES = -I"$(_TCLDIR)\include"
@@ -611,7 +611,7 @@ TCLSTUBLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclstub$(TCL_VERSION).lib"
TCLIMPLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)$(SUFX).lib"
TCL_LIBRARY = $(_TCLDIR)\library
TCLREGLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclreg13$(SUFX:t=).lib"
-TCLDDELIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcldde13$(SUFX:t=).lib"
+TCLDDELIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcldde14$(SUFX:t=).lib"
COFFBASE = "$(_TCLDIR)\win\coffbase.txt"
TCLTOOLSDIR = $(_TCLDIR)\tools
TCL_INCLUDES = -I"$(_TCLDIR)\generic" -I"$(_TCLDIR)\win"