File: links-usage-keystrokes.html, Node: Keystrokes Reference, Next: Popup Menu, Prev: Starting Links, Up: Using Links

# 1.2 Keystrokes Reference

# [Version 0.82]

### Page Contents

- 1.2.1 Application Level
- 1.2.2 Fetching a Document
- 1.2.3 Navigating a Displayed Document
- 1.2.4 Other Document Functions
- 1.2.5 Search and Find
- 1.2.6 Other Keystrokes
- 1.2.7 Notes to table

### 1.2.1 Application level

Action | Keystroke | Comments:
--- | --- | ---
Display Menu | <ESC> or <F9> or <F10> | Activates the "Popup Menu" [1.3] at the top of the term window. A mouse click on the top line of the screen produces the same effect.
Screen Refresh | No keystroke available. | TIP (in X only): To refresh the screen after a system or error message has been written to the terminal, resize the screen to get Links to redraw it.
Exit / Quit Links | ^C | Closes Links cleanly and quickly.

### 1.2.2 Fetching a document

Action | Keystroke | Comments:
--- | --- | ---
Open/ Go to url/filename | g or G | Activates pop-up box where you can enter a filename or url. Using the <Up_Arrow> key while the "Go to box" is active permits scrolling of this session's "Go to" history (i.e. all the urls/filenames you typed in). Links will also automatically prepend any request with the protocol prefix (http://; file://; ftp://) according to the scheme explained in [Note 1].
Follow and Display current link | <enter> or <return> or --> <Right_Arrow> | Invokes a request for the current link's file to display. A left mouse button click does the same. Please note that Links, in it's distributed form, will attempt to display any file request. To prevent the undesirable display of files such as image files, see [Note 2].
Download link file | d or D | Same as 'Save Link As' in some other browsers. To specify a default download directory, add the following line to your ".links.cfg" file. download_dir Downloads where "Downloads" is an existing directory relative to your home directory.
Go back | <-- <Left_Arrow> | Reloads previously displayed document (if any).
Stop fetching | <-- <Left_Arrow> | To stop a file transfer, press this key once.
Reload/Refresh current page | ^R | Note: this is not a screen refresh, it just reloads the page from the server.

### 1.2.3 Navigating a displayed document

Action | Keystroke | Comments:
--- | --- | ---
Previous link | <Up_Arrow> | Jumps to previous link on the current screen, or to the bottom link of the previous screen if there are no intermediate links. See [Note 3] on how Links navigates a document structured as columns with this arrow key.
Next link | <Down_Arrow> | Jumps to next link on the current screen, or to the top link of the next screen if there are no intermediate links. See [Note 3] on how Links navigates a document structured as columns with this arrow key.
Jump to "bottom of page" | <End> or ^E | Jumps to the bottom of the page, i.e. past the bottom of the current screen, if the current screen is not at the bottom.
Jump to "top of page" | <Home> or ^A | Jumps to the top of the page, i.e. past the top of the current screen, if current screen is not the first one.
Jump to "next screen" | <Space_Bar> or <Page_Down> or ^F | One screen forward (i.e. down). The <Down_Arrow> also does this, but ONLY if there are no intervening links.
Jump to "previous screen" | b or <Page_Up> or ^B | Back by one screen (i.e. up). The <Up_Arrow> also does this, but ONLY if there are no intervening links.
Scroll down | <Delete> or ^N | Scrolls down two lines at a time. If any links are on the screen, the first one is active.
Scroll up | <Insert> or ^P | Scrolls up two lines at a time. If any links are on the screen, the last one is active.
Scroll right | ] | For those pages where content is off the right of the screen.
Scroll left | [ | Getting back to the left, having just scrolled to the right.

### 1.2.4 Other Document Functions

Action | Keystroke | Comments:
--- | --- | ---
Document info | = | Displays the currently displayed document's HTTP/1.0 header information in a popup box.
Toggle document view | \ | HTML --> source (plain text) source (plain text) --> HTML.

### 1.2.5 Search and Find

Action | Keystroke | Comments:
--- | --- | ---
Search forward | / | See [Note 4] on the Links search and find behaviour.
Search backward | ?
Find next | n
Find previous | N

### 1.2.6 Other Keystrokes

Action | Keystroke | Comments:
--- | --- | ---
Follow link | ^M or ^J | Same as pressing <return> or <enter>.
Links --> background | ^Z | Puts Links into the background. Do fg links to recover the process. Does not work for forked processes, like 'xterm -e links &'

### 1.2.7 Notes to Table

#### Note 1: Auto prepending file requests.

Links will auto-prepend the appropriate protocol to a "Go to" request using the following scheme.

1. Any request containing a dot separator and beginning with the term "ftp" will be prepended with ftp://.
2. Any other request containing a dot separator in the first phrase will be prepended with http://.
3. Any request without a dot separator or beginning with the terms "./" or "../" will be prepended with file://.

#### Note 2: Following links to non-HTML files.

Links, in its distributed form, will attempt to display any file that is requested with a "Go to" command, either as rendered HTML or as plain text. In order to stop the undesirable display of binaries in "plain text" you need to add some entries to your "~./.links/.links.cfg" file.

Here are two examples which will send image files to the xv(1) graphics application (if installed):

    				extension "jpg,jpeg,jpe" "image/jpeg"
    				extension "gif" "image/gif"
    				association "Image Display in X" "image/gif,image/jpeg" "xv %" 3 1

The section "File Extensions and Associations" [2.4] has a longer discussion of this subject, and explains how to quickly and easily setup associations for most known MIME types.

#### Note 3: How Links navigates a document with the up/down arrow keys

The following diagram illustrates how, when the <Down_Arrow> key is pressed, it jumps from link-to-link in a columns setting.

How Links jumps from link to link in a column setting.

                         +====== screen 1 ========+
                         | col A   col B    col C |
                         |------------------------|
                         |  1        4            |
                         |  2                  6  |
                         |  3        5         7  |
                         +------------------------+
                         +====== screen 2 ========+
                         | col A   col B    col C |
                         |------------------------|
                         | 10                 14  |
                         | 11                 15  |
                         | 12       13            |
                         +------------------------+

#### Note 4: Explanation of Links' Search and Find

The search and find functions in Links highlights phrases that match the term you are looking for. If you are searching forwards in the document, Links will highlight the first term it finds, on the first screen where it finds it.

Links does not scroll the the page so that the first term is displayed at the top of the current screen. It will merely behave as if you had pressed the <Page_Down> key, and all matched terms will be highlighted in reverse video.

Pressing the n key ("find next") will not "move" the next matched term to the top of the current screen -- it will jump to the next screen where a match is found.

In short, the search and find functions does this:

1. Find and highlight all matches in the document.
2. Jump to the next screen where a match is located, i.e. the equivalent of pressing the <Page_Down> key.

User Reference Manual for Links Version 0.82 | Revision Date: 2000-02-16

Copyright (C) 2000 Cliff Cunnington, <cliff@ccnet.demon.nl>

Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.