Skip to content

Commit dfe5830

Browse files
author
csaba
committed
Fix for [d62ee2a05e]: tk console manual errors and undocumented bindings.
1 parent 0c8ceb8 commit dfe5830

2 files changed

Lines changed: 35 additions & 9 deletions

File tree

changes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8363,3 +8363,5 @@ Tk Cocoa 2.0: More drawing internals refinements (culler,walzer)
83638363
2026-07-24 (bug) [2f8570] ttk::entry has a wrong background in clam theme and readonly state (emiliano)
83648364

83658365
2026-08-06 (bug) [971a26] Xlib emulation for macOS causes many visual artifacts (nemethi)
8366+
8367+
2026-08-08 (bug) [d62ee2] tk console manual errors and undocumented bindings (anonymous)

doc/console.n

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,35 +80,45 @@ stderr channels is handled by invoking the \fBtk::ConsoleOutput\fR
8080
command in the console interpreter with two arguments. The first
8181
argument is the name of the channel being written to, and the second
8282
argument is the string being written to the channel (after encoding
83-
and end-of-line translation processing has been performed.)
83+
and end-of-line translation processing has been performed).
8484
.PP
8585
When the \fB.\fR window of the main interpreter is destroyed, the
8686
\fBtk::ConsoleExit\fR command in the console interpreter is called
87-
(assuming the console interpreter has not already been deleted itself,
88-
that is.)
87+
(assuming the console interpreter has not already been deleted itself).
8988
.SH "DEFAULT BINDINGS"
9089
.PP
9190
The default script creates a console window (implemented using a text
9291
widget) that has the following behaviour:
9392
.IP [1]
94-
Pressing the tab key inserts a TAB character (as defined by the Tcl
95-
\et escape.)
93+
Pressing tab or escape attempts to complete the text immediately before
94+
the cursor. The console tries, in order, a file name in the current
95+
directory, then a command name, then a variable name, stopping at the
96+
first type that produces a match.
97+
.RS
98+
.PP
99+
Only that type is then used - if more than one match is found within
100+
it, the longest common match is filled in; the full list is not shown
101+
until completion is attempted again with nothing left to extend.
102+
.PP
103+
Specific completion bindings for files, commands, and variables are
104+
listed below (see items 12 - 14).
105+
.RE
96106
.IP [2]
97107
Pressing the return key causes the current line (if complete by the
98108
rules of \fBinfo complete\fR) to be passed to the main interpreter for
99109
evaluation.
100110
.IP [3]
101111
Pressing the delete key deletes the selected text (if any text is
102112
selected) or the character to the right of the cursor (if not at the
103-
end of the line.)
113+
end of the line).
104114
.IP [4]
105115
Pressing the backspace key deletes the selected text (if any text is
106-
selected) or the character to the left of the cursor (of not at the
107-
start of the line.)
116+
selected) or the character to the left of the cursor (if not at the
117+
start of the line).
108118
.IP [5]
109119
Pressing either Control+A or the home key causes the cursor to go to
110120
the start of the line (but after the prompt, if a prompt is present on
111-
the line.)
121+
the line).
112122
.IP [6]
113123
Pressing either Control+E or the end key causes the cursor to go to
114124
the end of the line.
@@ -127,6 +137,20 @@ one character forward.
127137
.IP [11]
128138
Pressing F9 rebuilds the console window by destroying all its children
129139
and reloading the Tcl script that defined the console's behaviour.
140+
.IP [12]
141+
Pressing Control+Shift+F completes only against file names in the current
142+
directory, regardless of what tab/escape would otherwise try first.
143+
.IP [13]
144+
Pressing Control+Shift+P completes only against command names (referred to
145+
internally as "proc" completion, though it matches any command, not only
146+
user-defined procs).
147+
.IP [14]
148+
Pressing Control+Shift+V completes only against variable names. If the text
149+
being completed looks like an array element (array(name)), it completes
150+
against that array's element names instead of variable names generally.
151+
.IP [15]
152+
Scrolling the mouse wheel while holding Cmd (macOS) or Ctrl (other platforms)
153+
increases (scroll up) or decreases (scroll down) the console font size.
130154
.PP
131155
Most other behaviour is the same as a conventional text widget except
132156
for the way that the \fI<<Cut>>\fR event is handled identically to the

0 commit comments

Comments
 (0)