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.
The following shortcuts are implemented in all binding sets.
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.
Most keyboards have a number of keys that are specialized to particular functions. The functions are explained here.
Arrow keys
Shift+Arrow keys
Ctrl+Arrow keys
Ctrl+Shift+Arrow keys
Backspace
Ctrl+Backspace
Delete
Ctrl+Delete
End
Home
Ctrl+End
Ctrl+Home
Shift+End
Shift+Home
Ctrl+Shift+End
Ctrl+Shift+Home
Page down
Shift+Page down
Page up
Shift+Page up
The following shortcuts work in the HTML viewer:
Space
Home
End
Button-2
Shift+Button-1
Ctrl+Left arrow
Ctrl+Right arrow
Ctrl+Tab
In addition, the toolbar buttons in the HTML viewer have underlined characters that can be used as shortcuts to invoke the buttons.
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
Return
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
Ctrl+Tab
Ctrl+Shift+Tab
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
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.
Alt+Tab
Alt+Shift+Tab
Ctrl+F6
Ctrl+Shift+F6
Ctrl+Tab
Ctrl+F9
Ctrl+F10
Ctrl+F5
Ctrl+F7
Alt+F4
Ctrl+A
Ctrl+C
Ctrl+H
Ctrl+O
Ctrl+O Ctrl+O
Ctrl+P
Ctrl+Q
Ctrl+R
Ctrl+S
Ctrl+V
Ctrl+W
Ctrl+X
Ctrl+Y
Ctrl+Z
In addition to the above bindings, text editors support:
Ctrl+D
Ctrl+F
Ctrl+G
Ctrl+H
Ctrl+I
Ctrl+J
Ctrl+K
Ctrl+L
Ctrl+R
Ctrl+T
Ctrl+U
Ctrl+Z
In the explanations below, x
and y
are used
generically to refer to some key on the keyboard.
C-x
x
key.
C-X
x
key
at the same time.
Esc-x
M-x
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
x
key. Then hit the y
key.
C-a
C-b
M-b
C-e
C-f
M-f
C-c C-g
C-l
C-n
C-p
C-r
C-s
C-v
M-v
M-<
M->
The following commands are available in the File
menu
in many windows as well
through key bindings:
C-x C-f
C-x C-v
C-x i
C-x C-s
C-x C-w
C-x p
C-x C-r
C-x C-q
C-x v
C-x k
C-x C-c
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
C-d
M-d
C-k
C-o
C-x u
M-l
M-u
C-u
C-w
M-w
C-y
C-/
C-\
Any set of contiguous character deletions are collected into a single undo action.
M-q
C-x f
C-x .
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.
C-x o
C-x O
C-x 0
C-x 1
C-x 2
C-x 6
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
C-F
C-P
This is so that the most important Emacs bindings can be respected:
C-a
C-b
C-d
C-e
C-f
C-k
C-l
C-n
C-p
The right mouse button brings up a context-sensitive pop-up menu that with some of the following choices:
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."