tkcon: Special Bindings SourceForge Logo
Documentation Purpose & Features Limitations To Do License
Online Demo (requires Tk plugin) Using TkCon with other Tk Languages
Getting Started Special Bindings Procedures Screenshot
dump tkcon idebug observe

Most of the bindings are the same as for the Text widget. Some have been modified to make sure that the integrity of the console is maintained. Others have been added to enhance the usefulness of the console. Only the modified or new bindings are listed here.

Control-x or Cut (on Sparc5 keyboards)
Control-c or Copy (on Sparc5 keyboards)
Control-v or Paste (on Sparc5 keyboards)
Insert (duh).

Goes up one level in the commands line history when cursor is on the prompt line, otherwise it moves through the buffer
Goes down one level in the commands line history when cursor is on the last line of the buffer, otherwise it moves through the buffer
Goes up one level in the commands line history
Goes down one level in the commands line history

Tries to expand file path names, then variable names, then proc names.
Tries to expand file path names.
Tries to expand procedure names. The procedure names will be those that are actually in the attached interpreter (unless nontcl is specified, in which case it always does the lookup in the default slave interpreter).
Tries to expand variable names (those returned by [info vars]). It's search behavior is like that for procedure names.

Return or Enter
Evaluates the current command line if it is a complete command, otherwise it just goes to a new line
Go to the beginning of the current command line
Clear the entire console buffer
Searches backwards in the history for any command that contains the string in the current command line. Repeatable to search farther back. The matching substring off the found command will blink.
As above, but searches forward (only useful if you searched too far back).
Transposes characters
Clear the current command line
Saves current command line in a buffer that can be retrieved with another Control-z. If the current command line is empty, then any saved command is retrieved without being overwritten, otherwise the current contents get swapped with what's in the saved command buffer.

Attaches console to the console's slave interpreter
Attaches console to the console's master interpreter
Attaches console to main TkCon interpreter
Pops up the "About" dialog
Creates a new console. Each console has separate state, including it's own widget hierarchy (it's a slave interpreter).
Close the current console OR Quit the program (depends on the value of TKCON(slaveexit)).
Closes the current console. Closing the main console will exit the program (something has to control all the slaves...)
TkCon also has electric bracing (similar to that in emacs). It will highlight matching pairs of {}'s, []'s, ()'s and ""'s. For the first three, if there is no matching left element for the right, then it blinks the entire current command line. For the double quote, if there is no proper match then it just blinks the current double quote character. It does properly recognize most escaping (except escaped escapes), but does not look for commenting (why would you interactively put comments in?).

© Jeffrey Hobbs