@@ -80,35 +80,45 @@ stderr channels is handled by invoking the \fBtk::ConsoleOutput\fR
8080command in the console interpreter with two arguments. The first
8181argument is the name of the channel being written to, and the second
8282argument 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
8585When the \fB .\fR window of the main interpreter is destroyed, the
8686\fB tk::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
9190The default script creates a console window (implemented using a text
9291widget) that has the following behaviour:
9392.IP [1]
94- Pressing the tab key inserts a TAB character (as defined by the Tcl
95- \e t 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]
97107Pressing the return key causes the current line (if complete by the
98108rules of \fB info complete \fR ) to be passed to the main interpreter for
99109evaluation.
100110.IP [3]
101111Pressing the delete key deletes the selected text (if any text is
102112selected) 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]
105115Pressing 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]
109119Pressing either Control+A or the home key causes the cursor to go to
110120the start of the line (but after the prompt, if a prompt is present on
111- the line.)
121+ the line).
112122.IP [6]
113123Pressing either Control+E or the end key causes the cursor to go to
114124the end of the line.
@@ -127,6 +137,20 @@ one character forward.
127137.IP [11]
128138Pressing F9 rebuilds the console window by destroying all its children
129139and 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
131155Most other behaviour is the same as a conventional text widget except
132156for the way that the \fI <<Cut>> \fR event is handled identically to the
0 commit comments