Enhanced Tk Console (TkCon) Docs: bindings
Bindings:
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)
- Cut
- Control-c or Copy (on Sparc5 keyboards)
- Copy
- Control-v or Paste (on Sparc5 keyboards)
- Paste
- Insert
- Insert (duh).
- Up
- Goes up one level in the commands line history when cursor is on the
prompt line, otherwise it moves through the buffer
- Down
- 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
- Control-p
- Goes up one level in the commands line history
- Control-n
- Goes down one level in the commands line history
- Tab
- Tries to expand path names
- Control-P
- 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).
- Control-V
- Tries to expand variable names (only globals). 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
- Control-a
- Go to the beginning of the current command line
- Control-l
- Clear the entire console buffer
- Control-r
- Searches backwards in the history for a command starting with the
current command line. Repeatable to search farther back.
- Control-s
- As above, but searches forward (only useful if you searched too far back).
- Control-t
- Transposes characters
- Control-u
- Clear the current command line
- Control-z
- 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.
- Page_Up
- You figure it out. Some machines have problems binding to this.
- Page_Down
- Guess...
- Control-Key-1
- Attaches console to the console's slave interpreter.
- Control-Key-2
- Attaches console to the console's master interpreter.
- Control-Key-3
- Attaches console to main TkCon interpreter.
- Control-A
- Pops up the "About" dialog
- Control-N
- Creates a new console. Each console has separate state, including
it's own widget hierarchy (it's a slave interpreter).
- Control-q
- Quit the program
- Control-w
- 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?).
Contact jhobbs@cs.uoregon.edu
with questions.