Tycho Shortcuts

Introduction

A shortcut (also called a key binding or just binding) is a way to invoke a command by typing some combination of keys (vs. moving the mouse or using the menus). It is advisable to learn to use these shortcuts, since they can significantly speed up your interaction with Tycho, and they can reduce the stress on your hands. When shortcuts have an equivalent menu command, then the shortcut is noted in the menu to aid learning. In addition, the menus can be traversed using the keyboard, a mechanism that we highly recommend using. Many shortcuts work equally with text and graphics, although some will be obviously specific to one or the other.

Three sets of shortcuts are currently provided with Tycho:

The first set follows the conventions used in most applications that run under Microsoft Windows, like Microsoft Word. The second set follows the conventions of the popular Unix program Emacs. The third set preserves the most common Emacs bindings (those for navigation) and uses Windows bindings for everything else (those that do not conflict with the Emacs bindings). The third set is advised for Unix users who are transitioning to Windows. In all cases, only a subset of the shortcuts, hopefully the most useful ones, are provided.

By default, the set of bindings is chosen for you automatically. If your platform is a Unix machine, then Unix bindings are selected. If your platform is a Windows machine, then Windows shortcuts are selected. You can override this through the preferences editor. Under the Help menu, select "Style Preferences..." The style sheet that controls the shortcuts is called "Interaction". Click its Edit button. The "Keyboard shortcuts" preference lists the options. Select your preference and close the window. You must restart Tycho for the changes to take effect.

Universal shortcuts

The following shortcuts are implemented in all binding sets.

Menu traversal

Menus in Tycho are carefully designed to provide access to all but the most basic navigation operations. As such, they should be viewed as documentation of the capabilities of a widget as well as a mechanism for invoking commands. Although menu commands are normally invoked using the mouse, it is often more convenient (and easier on your hands) to invoke them through the keyboard. Two mechanisms are provided for doing this.

First, note that the menu labels have an underlined character. Holding the Alt button in combination with the underlined letter causes the corresponding menu to be posted. Note further that each menu entry has an underlined letter. While the menu is posted, typing the underlined letter causes that command to be invoked. If the menu is hierarchical, it may instead cause a submenu to be posted. This mechanism can be very quick and easy to learn for frequently used commands. For example, Alt-F O invokes "open file" and is some feel that it is easier to type than Ctrl+X Ctrl+F (the Emacs binding for the same function).

In a second mechanism, the function key F10 will post the leftmost menu. Arrow keys can be used to switch between menus and between items in the menu. This mechanism is not generally as convenient as using the Alt key for users who type well.

Special keys

Most keyboards have a number of keys that are specialized to particular functions. The functions are explained here.

Arrow keys
move left, right, up, or down
Shift+Arrow keys
extend the selection
Ctrl+Arrow keys
move by words (left, right) or paragraphs (up, down)
Ctrl+Shift+Arrow keys
select by words (left, right) or paragraphs (up, down)
Backspace
delete one character to the left
Ctrl+Backspace
delete one word to the left
Delete
delete one character to the right
Ctrl+Delete
delete one word to the right
End
move to the end of the line
Home
move to the start of the line
Ctrl+End
move to the end of the buffer
Ctrl+Home
move to the start of the buffer
Shift+End
select to the end of the line
Shift+Home
select to the start of the line
Ctrl+Shift+End
select to the end of the buffer
Ctrl+Shift+Home
select to the start of the buffer
Page down
move down one page
Shift+Page down
select down one page
Page up
move up one page
Shift+Page up
select up one page

HTML shortcuts

The following shortcuts work in the HTML viewer:

Space
scroll down one page
Home
go to the top of the page
End
go to the bottom of the page
Button-2
on a hypertext link, open in a new window
Shift+Button-1
on a hypertext link, open in a new window
Ctrl+Left arrow
back to previous page
Ctrl+Right arrow
forward to next page
Ctrl+Tab
shift the focus to the toolbar and back

In addition, the toolbar buttons in the HTML viewer have underlined characters that can be used as shortcuts to invoke the buttons.

Bindings for Dialogs

Most dialog boxes have a button that is surrounded by an extra sunken or highlighted ring that can be invoked by typing Return. In addition, dialogs can be dismissed without invoking any buttons by typing Escape.

Escape
dismiss the dialog, cancelling the command
Return
dismiss the dialog, completing the command

In addition, buttons generally have an underlined character. Typing that character will invoke the button, unless the focus is in a text entry box. The focus can be move out of a text entry box using any of the following mechanisms:

Tab
move from one item to another
Ctrl+Tab
move from one item to another
Ctrl+Shift+Tab
move from one item to another in the reverse direction.

Note that in multi-line text entry boxes, Tab simply inserts a tab character, so you must use Ctrl+Tab.

Some dialog boxes have checkbuttons. To change the state of these from the keyboard, move the focus to the checkbutton and type Space.

Space
invoke a button

Windows shortcuts

In Windows applications, navigation (moving the cursor around) is done primarily with special keys, like the arrow keys. This contrasts with the Unix (Emacs) shortcuts, which use control characters for this purpose. In addition, Windows programs rely more heavily on keyboard-driven menu traversal, while Emacs uses a very long list of complicated key combinations.

Window management

Alt+Tab
next window (including other programs)
Alt+Shift+Tab
previous window (including other programs)
Ctrl+F6
next window (within Tycho)
Ctrl+Shift+F6
previous window (within Tycho)
Ctrl+Tab
next pane (for windows with multiple panes)
Ctrl+F9
minimize window
Ctrl+F10
maximize window
Ctrl+F5
restore window to original size
Ctrl+F7
resize to half height
Alt+F4
quit from Tycho

Editing text or graphics

Ctrl+A
select all
Ctrl+C
copy the selection to the clipboard
Ctrl+H
delete item
Ctrl+O
open a file using minibuffer
Ctrl+O Ctrl+O
open a file using file browser
Ctrl+P
print
Ctrl+Q
quit from Tycho
Ctrl+R
incremental search backwards
Ctrl+S
save
Ctrl+V
paste selection from the clipboard
Ctrl+W
close a window
Ctrl+X
cut selection to the clipboard
Ctrl+Y
redo the last undone action
Ctrl+Z
undo the last action

Editing text

In addition to the above bindings, text editors support:

Ctrl+D
delete forward one character
Ctrl+F
find using a search dialog
Ctrl+G
goto a particular line number
Ctrl+H
backspace
Ctrl+I
insert a tab character
Ctrl+J
insert a new line above the cursor
Ctrl+K
delete to the end of the line
Ctrl+L
center the insertion cursor in the window
Ctrl+R
incremental search backwards
Ctrl+T
incremental search forwards
Ctrl+U
delete to the beginning of the line
Ctrl+Z
undo the last action

Unix shortcuts

Abbreviations

In the explanations below, x and y are used generically to refer to some key on the keyboard.

C-x
Hold the control key at the same time as the x key.
C-X
Hold the control key, shift key, and the x key at the same time.
Esc-x
escape key followed by x.
M-x
Hold the meta key at the same time as the x key. The meta key is labeled on some keyboards with a diamond. If you have no meta key, try sequentially hitting the escape key followed by the x key.
M-x y
Hold the meta key at the same time as the x key. Then hit the y key.

Cursor navigation

C-a
go to the beginning of the line
C-b
backward one character
M-b
backward one word
C-e
go to the end of the line
C-f
forward one character
M-f
forward one word
C-c C-g
goto line
C-l
center the insert cursor on the screen
C-n
down one line
C-p
up one line
C-r
search backwards
C-s
search forwards
C-v
forward one page
M-v
backward one page
M-<
move to the top of the document
M->
move to the bottom of the document

File Access

The following commands are available in the File menu in many windows as well through key bindings:

C-x C-f
open a file
C-x C-v
switch to a new file in the same window
C-x i
insert a file
C-x C-s
save the current file
C-x C-w
save to some other file name
C-x p
print the contents (not yet implemented)
C-x C-r
evaluate a file (only valid in some derived classes)
C-x C-q
toggle read-only (possibly invoking version control)
C-x v
invoke revision control
C-x k
close the window
C-x C-c
exit the program

Modifying text

Delete, C-h, and Backspace all erase the previous character, unless there is a selection, in which case they erase the selection. M-Delete, M-C-h, and M-Backspace behave the same way, except that they erase a word at a time. In addition, the following bindings apply:

M-C
capitalize the selection or the current word
C-d
delete the next character
M-d
forward erase one word
C-k
erase to the end of the line.
C-o
open a line of text above the insert cursor
C-x u
undo the last change
M-l
make the selection or current word lower case
M-u
make the selection or current word upper case
C-u
delete to the start of the line
C-w
erase the selection
M-w
copy the selection to the clipboard
C-y
yank from the clipboard and insert at cursor
C-/
select the entire contents
C-\
clear any selection

Any set of contiguous character deletions are collected into a single undo action.

Filling Text

M-q
fill selected region or current paragraph
C-x f
change the right column used for the fill
C-x .
change the prefix characters used by the fill

The fill capability requires some explanation. The Fill Region command fills text so that the lines are approximately of equal length and line breaks occur on word boundaries. It can optionally add a prefix to each filled line (for example a comment character), and typically does so in language-specific editors, which are derived from the basic editor. If a region of text has been selected, then it fills that region. Otherwise, it fills the paragraph that contains the insertion cursor. A paragraph is bounded by a blank line before and after, or possibly a line with only the comment character.

Window management

C-x o
move the focus to another window pane
C-x O
move the focus to another window
C-x 0
iconify the window
C-x 1
full size
C-x 2
half size
C-x 6
original size

Compromise shortcuts

This set of shortcuts preserves the most common Emacs bindings (those for navigation) and uses Windows bindings for everything else, where they do not conflict with the Emacs bindings. This set is advised for Unix users who are transitioning to Windows.

The Windows bindings that are changed are:

C-A
Select all (vs. C-a)
C-F
Find (vs. C-f)
C-P
Print (vs. C-p)

This is so that the most important Emacs bindings can be respected:

C-a
Beginning (of line for text)
C-b
Back one space
C-d
Delete (forward for text)
C-e
End (of line for text)
C-f
Move forward one character
C-k
Delete to end of line
C-l
Center the insertion cursor on the screen
C-n
Next line
C-p
Previous line

Mouse navigation

The right mouse button brings up a context-sensitive pop-up menu that with some of the following choices:

  • Undo the last editing operation
  • Cut the selection to the clipboard
  • Copy the selection to the clipboard
  • Paste contents of the clipboard
  • Delete the selection without saving it to the clipboard
  • Bring up documentation for the current widget.
  • Report the name of the widget (an Itcl object name).
  • Not all of the above right menu choices are available in all of the windows.

    The interaction of the mouse with text is otherwise that implemented in the text widget in Tk. Thus, the following documentation is again copied from the man page for the text widget, written by John Ousterhout, with minor editing.

    "Pressing mouse button 1 in an text positions the insertion cursor just before the character underneath the mouse cursor and sets the input focus to this widget. Dragging with mouse button 1 strokes out a selection between the insertion cursor and the character under the mouse.

    If you double-click mouse button 1 then the word under the mouse cursor will be selected, the insertion cursor will be positioned at the beginning of the word, and dragging the mouse will stroke out a selection whole words at a time. [Note that in some derived classes, double clicking activates a hypertext link.]

    If you triple-click mouse button 1 then the line under the mouse cursor will be selected, the insertion cursor will be positioned at the beginning of the line, and a dragging the mouse will stroke out a selection whole line at a time.

    The ends of the selection can be adjusted by dragging with mouse button 1 while the shift key is down; this will adjust the end of the selection that was nearest to the mouse cursor when button 1 was pressed. If the button is double-clicked before dragging then the selection will be adjusted in units of whole words; if it is triple-clicked, then the selection will be adjusted in units of whole lines.

    Clicking mouse button 1 with the Control key down will reposition the insertion cursor without affecting the selection.

    The view in the widget can be adjusted by dragging with mouse button 2. If mouse button 2 is clicked without moving the mouse, the selection is copied into the text at the position of the insertion cursor. The Insert key also inserts the selection."

    Tycho Home Page


    Copyright © 1996-1998, The Regents of the University of California. All rights reserved.
    Last updated: 06/07/98, comments to: eal@eecs.berkeley.edu