summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-08-14 13:38:13 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-08-14 13:38:13 (GMT)
commitd3e4f0bc9405b86444625dede7f676cb3d709df5 (patch)
tree3a70520262576b17a9904999cb72fbf706c5ff24
parent46d45df76056002dae01fa017aaa17478492ae52 (diff)
parentc7492578c7af6a586a3797ba790569ac6abacab2 (diff)
downloadtk-d3e4f0bc9405b86444625dede7f676cb3d709df5.zip
tk-d3e4f0bc9405b86444625dede7f676cb3d709df5.tar.gz
tk-d3e4f0bc9405b86444625dede7f676cb3d709df5.tar.bz2
merge trunk
-rw-r--r--ChangeLog18
-rw-r--r--doc/event.n48
-rw-r--r--doc/ttk_notebook.n2
-rw-r--r--generic/tkEvent.c6
-rw-r--r--generic/tkMain.c5
-rw-r--r--generic/tkTextTag.c34
-rw-r--r--generic/ttk/ttkLabel.c4
-rw-r--r--library/console.tcl6
-rw-r--r--library/demos/entry3.tcl4
-rw-r--r--library/demos/items.tcl2
-rw-r--r--library/demos/toolbar.tcl67
-rw-r--r--library/entry.tcl28
-rw-r--r--library/iconlist.tcl8
-rw-r--r--library/listbox.tcl28
-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.tcl131
-rw-r--r--library/ttk/entry.tcl10
-rw-r--r--library/ttk/notebook.tcl4
-rw-r--r--library/ttk/scale.tcl23
-rw-r--r--unix/tkUnixEvent.c2
-rw-r--r--unix/tkUnixKey.c4
-rw-r--r--unix/tkUnixRFont.c2
-rw-r--r--win/makefile.vc74
-rw-r--r--win/rules.vc10
28 files changed, 332 insertions, 340 deletions
diff --git a/ChangeLog b/ChangeLog
index 0a98897..5ba3e29 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+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.
+ * win/rules.vc: Sync with tcl version of rules.vc
+
+2012-08-11 Francois Vogel <fvogelnew1@free.fr>
+
+ * generic/tkTextTag.c: [Bug 3554273]: Test textDisp-32.2 failed
+
+2012-08-09 Stuart Cassoff <stwo@users.sourceforge.net>
+
+ * generic/tkEvent.c: Remove useless (void *) casts
+ * unix/tkUnixEvent.c: introduced in checkin [81e50c85ed].
+ * unix/tkUnixKey.c: The warnings were false flags from a
+ * unix/tkUnixRFont.c: faulty OpenBSD C compiler.
+
2012-07-31 Donal K. Fellows <dkf@users.sf.net>
* unix/tkUnixKey.c (TkpSetKeycodeAndState, TkpInitKeymapInfo)
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/doc/ttk_notebook.n b/doc/ttk_notebook.n
index 6b4b2bc..fe89994 100644
--- a/doc/ttk_notebook.n
+++ b/doc/ttk_notebook.n
@@ -184,7 +184,7 @@ containing the notebook as follows:
.IP \(bu
\fBControl-Tab\fR selects the tab following the currently selected one.
.IP \(bu
-\fBShift-Control-Tab\fR selects the tab preceding the currently selected one.
+\fBControl-Shift-Tab\fR selects the tab preceding the currently selected one.
.IP \(bu
\fBAlt-\fIK\fR, where \fIK\fR is the mnemonic (underlined) character
of any tab, will select that tab.
diff --git a/generic/tkEvent.c b/generic/tkEvent.c
index 7dd2813..463379a 100644
--- a/generic/tkEvent.c
+++ b/generic/tkEvent.c
@@ -337,7 +337,7 @@ CreateXIC(
preedit_attlist = XVaCreateNestedList(0,
XNSpotLocation, &spot,
XNFontSet, dispPtr->inputXfs,
- (void *) NULL);
+ NULL);
}
winPtr->inputContext = XCreateIC(dispPtr->inputMethod,
@@ -345,7 +345,7 @@ CreateXIC(
XNClientWindow, winPtr->window,
XNFocusWindow, winPtr->window,
preedit_attname, preedit_attlist,
- (void *) NULL);
+ NULL);
if (preedit_attlist) {
XFree(preedit_attlist);
@@ -360,7 +360,7 @@ CreateXIC(
/*
* Adjust the window's event mask if the IM requires it.
*/
- XGetICValues(winPtr->inputContext, XNFilterEvents, &im_event_mask, (void *) NULL);
+ XGetICValues(winPtr->inputContext, XNFilterEvents, &im_event_mask, NULL);
if ((winPtr->atts.event_mask & im_event_mask) != im_event_mask) {
winPtr->atts.event_mask |= im_event_mask;
XSelectInput(winPtr->display, winPtr->window, winPtr->atts.event_mask);
diff --git a/generic/tkMain.c b/generic/tkMain.c
index fddad3a..706f444 100644
--- a/generic/tkMain.c
+++ b/generic/tkMain.c
@@ -29,11 +29,6 @@
# endif
#endif
-#ifndef _WIN64
-/* See [Bug 2935503]: file mtime sets wrong time */
-# define _USE_32BIT_TIME_T
-#endif
-
#include "tkInt.h"
#include <ctype.h>
#include <stdio.h>
diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c
index fb514bf..beb7eb5 100644
--- a/generic/tkTextTag.c
+++ b/generic/tkTextTag.c
@@ -100,7 +100,7 @@ static TkTextTag * FindTag(Tcl_Interp *interp, TkText *textPtr,
Tcl_Obj *tagName);
static void SortTags(int numTags, TkTextTag **tagArrayPtr);
static int TagSortProc(const void *first, const void *second);
-static void TagBindEvent(TkText *textPtr, XEvent *eventPtr,
+static void TagBindEvent(TkText *textPtr, XEvent *eventPtr,
int numTags, TkTextTag **tagArrayPtr);
/*
@@ -213,7 +213,7 @@ TkTextTagCmd(
if (tagPtr == textPtr->selTagPtr) {
/*
- * Send an event that the selection changed. This is
+ * Send an event that the selection changed. This is
* equivalent to:
* event generate $textWidget <<Selection>>
*/
@@ -457,6 +457,14 @@ TkTextTagCmd(
&tagPtr->elide) != TCL_OK) {
return TCL_ERROR;
}
+
+ /*
+ * Indices are potentially obsolete after changing -elide,
+ * especially those computed with "display" or "any"
+ * submodifier, therefore increase the epoch.
+ */
+
+ textPtr->sharedTextPtr->stateEpoch++;
}
/*
@@ -947,15 +955,15 @@ TkTextCreateTag(
const char *name;
if (!strcmp(tagName, "sel")) {
- if (textPtr->selTagPtr != NULL) {
+ if (textPtr->selTagPtr != NULL) {
if (newTag != NULL) {
- *newTag = 0;
+ *newTag = 0;
}
- return textPtr->selTagPtr;
- }
+ return textPtr->selTagPtr;
+ }
if (newTag != NULL) {
*newTag = 1;
- }
+ }
name = "sel";
} else {
hPtr = Tcl_CreateHashEntry(&textPtr->sharedTextPtr->tagTable,
@@ -1054,7 +1062,7 @@ FindTag(
* NULL, then don't record an error
* message. */
TkText *textPtr, /* Widget in which tag is being used. */
- Tcl_Obj *tagName) /* Name of desired tag. */
+ Tcl_Obj *tagName) /* Name of desired tag. */
{
Tcl_HashEntry *hPtr;
int len;
@@ -1062,7 +1070,7 @@ FindTag(
str = Tcl_GetStringFromObj(tagName, &len);
if (len == 3 && !strcmp(str, "sel")) {
- return textPtr->selTagPtr;
+ return textPtr->selTagPtr;
}
hPtr = Tcl_FindHashEntry(&textPtr->sharedTextPtr->tagTable,
Tcl_GetString(tagName));
@@ -1394,7 +1402,7 @@ TkTextBindProc(
XEvent *eventPtr) /* Pointer to X event that just happened. */
{
TkText *textPtr = clientData;
- int repick = 0;
+ int repick = 0;
# define AnyButtonMask \
(Button1Mask|Button2Mask|Button3Mask|Button4Mask|Button5Mask)
@@ -1438,7 +1446,7 @@ TkTextBindProc(
}
} else if ((eventPtr->type == EnterNotify)
|| (eventPtr->type == LeaveNotify)) {
- if (eventPtr->xcrossing.state & AnyButtonMask) {
+ if (eventPtr->xcrossing.state & AnyButtonMask) {
textPtr->flags |= BUTTON_DOWN;
} else {
textPtr->flags &= ~BUTTON_DOWN;
@@ -1446,7 +1454,7 @@ TkTextBindProc(
TkTextPickCurrent(textPtr, eventPtr);
goto done;
} else if (eventPtr->type == MotionNotify) {
- if (eventPtr->xmotion.state & AnyButtonMask) {
+ if (eventPtr->xmotion.state & AnyButtonMask) {
textPtr->flags |= BUTTON_DOWN;
} else {
textPtr->flags &= ~BUTTON_DOWN;
@@ -1570,7 +1578,7 @@ TkTextPickCurrent(
= eventPtr->xmotion.same_screen;
textPtr->pickEvent.xcrossing.focus = False;
textPtr->pickEvent.xcrossing.state = eventPtr->xmotion.state;
- } else {
+ } else {
textPtr->pickEvent = *eventPtr;
}
}
diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c
index 17433dc..5102baf 100644
--- a/generic/ttk/ttkLabel.c
+++ b/generic/ttk/ttkLabel.c
@@ -351,9 +351,9 @@ static void ImageDraw(
if (state & TTK_STATE_DISABLED) {
if (TtkSelectImage(image->imageSpec, 0ul) == image->tkimg) {
- #ifndef MAC_OSX_TK
+#ifndef MAC_OSX_TK
StippleOver(image, tkwin, d, b.x,b.y);
- #endif
+#endif
}
}
}
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/demos/toolbar.tcl b/library/demos/toolbar.tcl
index e7c87e2..0ae4669 100644
--- a/library/demos/toolbar.tcl
+++ b/library/demos/toolbar.tcl
@@ -15,57 +15,46 @@ wm title $w "Toolbar Demonstration"
wm iconname $w "toolbar"
positionWindow $w
-if {[tk windowingsystem] ne {}} {
- ttk::label $w.msg -wraplength 4i -text "This is a demonstration of how to do\
- a toolbar that is styled correctly and which can be torn off. The\
- buttons are configured to be \u201Ctoolbar style\u201D buttons by\
- telling them that they are to use the Toolbutton style. At the left\
- end of the toolbar is a simple marker that the cursor changes to a\
- movement icon over; drag that away from the toolbar to tear off the\
- whole toolbar into a separate toplevel widget. When the dragged-off\
- toolbar is no longer needed, just close it like any normal toplevel\
- and it will reattach to the window it was torn off from."
-} else {
ttk::label $w.msg -wraplength 4i -text "This is a demonstration of how to do\
- a toolbar that is styled correctly. The buttons are configured to\
- be \u201Ctoolbar style\u201D buttons by telling them that they are\
- to use the Toolbutton style."
-}
+ a toolbar that is styled correctly and which can be torn off. The\
+ buttons are configured to be \u201Ctoolbar style\u201D buttons by\
+ telling them that they are to use the Toolbutton style. At the left\
+ end of the toolbar is a simple marker that the cursor changes to a\
+ movement icon over; drag that away from the toolbar to tear off the\
+ whole toolbar into a separate toplevel widget. When the dragged-off\
+ toolbar is no longer needed, just close it like any normal toplevel\
+ and it will reattach to the window it was torn off from."
## Set up the toolbar hull
set t [frame $w.toolbar] ;# Must be a frame!
ttk::separator $w.sep
ttk::frame $t.tearoff -cursor fleur
-if {[tk windowingsystem] ne {}} {
- ttk::separator $t.tearoff.to -orient vertical
- ttk::separator $t.tearoff.to2 -orient vertical
- pack $t.tearoff.to -fill y -expand 1 -padx 2 -side left
- pack $t.tearoff.to2 -fill y -expand 1 -side left
-}
+ttk::separator $t.tearoff.to -orient vertical
+ttk::separator $t.tearoff.to2 -orient vertical
+pack $t.tearoff.to -fill y -expand 1 -padx 2 -side left
+pack $t.tearoff.to2 -fill y -expand 1 -side left
ttk::frame $t.contents
grid $t.tearoff $t.contents -sticky nsew
grid columnconfigure $t $t.contents -weight 1
grid columnconfigure $t.contents 1000 -weight 1
-if {[tk windowingsystem] ne {}} {
- ## Bindings so that the toolbar can be torn off and reattached
- bind $t.tearoff <B1-Motion> [list tearoff $t %X %Y]
- bind $t.tearoff.to <B1-Motion> [list tearoff $t %X %Y]
- bind $t.tearoff.to2 <B1-Motion> [list tearoff $t %X %Y]
- proc tearoff {w x y} {
- if {[string match $w* [winfo containing $x $y]]} {
- return
- }
- grid remove $w
- grid remove $w.tearoff
- wm manage $w
- wm protocol $w WM_DELETE_WINDOW [list untearoff $w]
- }
- proc untearoff {w} {
- wm forget $w
- grid $w.tearoff
- grid $w
+## Bindings so that the toolbar can be torn off and reattached
+bind $t.tearoff <B1-Motion> [list tearoff $t %X %Y]
+bind $t.tearoff.to <B1-Motion> [list tearoff $t %X %Y]
+bind $t.tearoff.to2 <B1-Motion> [list tearoff $t %X %Y]
+proc tearoff {w x y} {
+ if {[string match $w* [winfo containing $x $y]]} {
+ return
}
+ grid remove $w
+ grid remove $w.tearoff
+ wm manage $w
+ wm protocol $w WM_DELETE_WINDOW [list untearoff $w]
+}
+proc untearoff {w} {
+ wm forget $w
+ grid $w.tearoff
+ grid $w
}
## Toolbar contents
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 99047f4..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> {
@@ -120,7 +120,7 @@ bind Listbox <Control-Home> {
%W selection set 0
event generate %W <<ListboxSelect>>
}
-bind Listbox <Shift-Control-Home> {
+bind Listbox <Control-Shift-Home> {
tk::ListboxDataExtend %W 0
}
bind Listbox <Control-End> {
@@ -130,7 +130,7 @@ bind Listbox <Control-End> {
%W selection set end
event generate %W <<ListboxSelect>>
}
-bind Listbox <Shift-Control-End> {
+bind Listbox <Control-Shift-End> {
tk::ListboxDataExtend %W [%W index end]
}
bind Listbox <<Copy>> {
@@ -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 331d1b4..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 <Shift-Control-Up> {
+bind Text <<SelectPrevPara>> {
tk::TextKeySelect %W [tk::TextPrevPara %W insert]
}
-bind Text <Shift-Control-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 928fc2e..7ef25ec 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>> <Shift-Control-Right>
+ event add <<SelectNextWord>> <Control-Shift-Right>
event add <<PrevWord>> <Control-Left>
- event add <<SelectPrevWord>> <Shift-Control-Left>
- event add <<LineStart>> <Home>
- event add <<SelectLineStart>> <Shift-Home>
- event add <<LineEnd>> <End>
- event add <<SelectLineEnd>> <Shift-End>
+ event add <<SelectPrevWord>> <Control-Shift-Left>
+ 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,56 +409,73 @@ 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>
event add <<SelectPrevChar>> <Shift-Left>
event add <<NextWord>> <Control-Right>
- event add <<SelectNextWord>> <Shift-Control-Right>
+ event add <<SelectNextWord>> <Control-Shift-Right>
event add <<PrevWord>> <Control-Left>
- event add <<SelectPrevWord>> <Shift-Control-Left>
- event add <<LineStart>> <Home>
+ event add <<SelectPrevWord>> <Control-Shift-Left>
+ 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 <<SelectNextChar>> <Shift-Right>
- event add <<PrevChar>> <Left>
- event add <<SelectPrevChar>> <Shift-Left>
+ 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> <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>> <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/notebook.tcl b/library/ttk/notebook.tcl
index d424b6c..72b85e6 100644
--- a/library/ttk/notebook.tcl
+++ b/library/ttk/notebook.tcl
@@ -108,7 +108,7 @@ proc ttk::notebook::enableTraversal {nb} {
bind $top <Control-Key-Next> {+ttk::notebook::TLCycleTab %W 1}
bind $top <Control-Key-Prior> {+ttk::notebook::TLCycleTab %W -1}
bind $top <Control-Key-Tab> {+ttk::notebook::TLCycleTab %W 1}
- bind $top <Shift-Control-Key-Tab> {+ttk::notebook::TLCycleTab %W -1}
+ bind $top <Control-Shift-Key-Tab> {+ttk::notebook::TLCycleTab %W -1}
catch {
bind $top <Control-Key-ISO_Left_Tab> {+ttk::notebook::TLCycleTab %W -1}
}
@@ -170,7 +170,7 @@ proc ttk::notebook::EnclosingNotebook {w} {
}
# TLCycleTab --
-# toplevel binding procedure for Control-Tab / Shift-Control-Tab
+# toplevel binding procedure for Control-Tab / Control-Shift-Tab
# Select the next/previous tab in the nearest ancestor notebook.
#
proc ttk::notebook::TLCycleTab {w dir} {
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/unix/tkUnixEvent.c b/unix/tkUnixEvent.c
index 0987129..4d0ccfa 100644
--- a/unix/tkUnixEvent.c
+++ b/unix/tkUnixEvent.c
@@ -646,7 +646,7 @@ OpenIM(
}
if ((XGetIMValues(dispPtr->inputMethod, XNQueryInputStyle, &stylePtr,
- (void *) NULL) != NULL) || (stylePtr == NULL)) {
+ NULL) != NULL) || (stylePtr == NULL)) {
goto error;
}
diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c
index f13adf7..d07f13a 100644
--- a/unix/tkUnixKey.c
+++ b/unix/tkUnixKey.c
@@ -64,9 +64,9 @@ Tk_SetCaretPos(
spot.x = dispPtr->caret.x;
spot.y = dispPtr->caret.y + dispPtr->caret.height;
- preedit_attr = XVaCreateNestedList(0, XNSpotLocation, &spot, (void *) NULL);
+ preedit_attr = XVaCreateNestedList(0, XNSpotLocation, &spot, NULL);
XSetICValues(winPtr->inputContext, XNPreeditAttributes, preedit_attr,
- (void *) NULL);
+ NULL);
XFree(preedit_attr);
}
#endif
diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c
index 50642ad..ab2ed4a 100644
--- a/unix/tkUnixRFont.c
+++ b/unix/tkUnixRFont.c
@@ -123,7 +123,7 @@ GetFont(
FC_FAMILY, FcTypeString, "sans",
FC_SIZE, FcTypeDouble, 12.0,
FC_MATRIX, FcTypeMatrix, &mat,
- (void *) NULL);
+ NULL);
}
if (!ftFont) {
/*
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..f09e2ea 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -8,7 +8,7 @@
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# Copyright (c) 2001-2003 David Gravereaux.
-# Copyright (c) 2003-2007 Patrick Thoyts
+# Copyright (c) 2003-2008 Patrick Thoyts
#------------------------------------------------------------------------------
!ifndef _RULES_VC
@@ -243,9 +243,9 @@ TCL_USE_STATIC_PACKAGES = 1
TCL_USE_STATIC_PACKAGES = 0
!endif
!if [nmakehlp -f $(OPTS) "nothreads"]
+!message *** Compile explicitly for non-threaded tcl
TCL_THREADS = 0
!else
-!message *** Doing threads
TCL_THREADS = 1
USE_THREAD_ALLOC= 1
!endif
@@ -287,7 +287,7 @@ LOIMPACT = 0
USE_THREAD_ALLOC = 1
!endif
!if [nmakehlp -f $(OPTS) "tclalloc"]
-!message *** Doing thrdalloc
+!message *** Doing tclalloc
USE_THREAD_ALLOC = 0
!endif
!if [nmakehlp -f $(OPTS) "unchecked"]
@@ -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"