shifted bindings for selecting with movement keys
[conkeror/arlinius.git] / help / tutorial.html
blob2e98f499204a35f4d8a11b2746b6d70893087b6c
1 <!DOCTYPE html
2 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <!--
5 (C) Copyright 2007 John J. Foerch
7 Use, modification, and distribution are subject to the terms specified in the
8 COPYING file.
9 -->
11 <html xmlns="http://www.w3.org/1999/xhtml">
12 <head>
13 <title>Conkeror Tutorial</title>
14 <link rel="stylesheet" type="text/css" href="chrome://conkeror-help/content/manual.css" />
15 </head>
16 <body>
17 <h1>Conkeror Tutorial</h1>
19 <h3>Reading Key Notation</h3>
21 <p>
22 The first thing you need to know about Conkeror is how to read key
23 notation. Each key combination is written as a hyphenated list of
24 modifiers and key. The codes for the common modifiers are as
25 follows: <code class="key">C</code> means Control; <code class="key">M</code> means Meta or
26 Alt; and <code class="key">S</code> means Shift. Therefore the key combination
27 <code class="key">C-M-f</code> means to hold down Control and Meta and press
28 <code class="key">f</code>.
29 </p>
31 <p>
32 The key to scroll down is <code class="key">C-n</code>. The key to scroll up is
33 <code class="key">C-p</code>
34 </p>
36 <p>
37 Many commands in Conkeror are run by typing a sequence of two or
38 more key combinations. The notation is simple. Each combination in
39 the sequence is written, in order, separated by spaces. The
40 sequence <code class="key">C-h t</code> means to press Control-h, release all
41 keys, then press <code class="key">t</code>. <code class="key">C-h t</code> is the key
42 sequence to view this tutorial.
43 </p>
45 <p>
46 The key sequence to exit conkeror is <code class="key">C-x C-c</code>.
47 </p>
49 <p>
50 <code class="key">C-g</code> is the abort key. It is used to cancel a command
51 from the minibuffer, or stop a web page from loading.
52 </p>
54 <p>
55 <code class="key">Space</code> and <code class="key">Backspace</code> scroll a page down and
56 a page up, respectfully.
57 </p>
60 <h3>Basic Navigation</h3>
62 <p>
63 To have Conkeror prompt you for an URL and navigate there, type
64 <code class="key">g</code>. The mnemonic is "go". A similar command,
65 <code class="key">find-alternate-url</code>, is called with the sequence
66 <code class="key">C-x C-v</code>. When find-alternate-url prompts you for an
67 url, the prompt will be pre-filled with the url of the current
68 buffer, so you can edit it.
69 </p>
71 <p>
72 The <code class="key">B</code> key (note uppercase) is bound to
73 the <code>back</code> command. Practice basic navigation by
74 typing <code class="key">g</code> and entering the text "about:" in
75 the url prompt. To come back to this tutorial from the about: page,
76 type <code class="key">B</code>.
77 </p>
80 <h3>Hinting</h3>
82 <p>
83 The system for interacting with the elements of a document is called
84 the hinting system. With the hinting system, you can do things like
85 follow hyperlinks, copy URLs, focus form fields, and more. Let's
86 use the hinting system to follow a hyperlink. You will receive
87 instructions about how to return here after you follow the
88 hyperlink. If the numbered list and hyperlink following this
89 paragraph are not in view, scroll so that they are.
90 </p>
92 <ol>
93 <li>Press <code class="key">f</code>. (mnemonic: follow)</li>
94 <li>The hyperlink should be hilighted, with a number on the left
95 side. Type that number and hit enter.</li>
96 </ol>
99 <a href="chrome://conkeror-help/content/back-forward.html">This is a
100 hyperlink.</a>
103 As a matter of fact, in addition to following links by number, you can
104 also follow them by a substring of the link text. You could select the
105 link above by typing <code class="key">f t h i s</code>. When more than
106 one link with similar text is in view, hinting will narrow down the
107 choices as you type. You can always specify the one you want by
108 disambiguating the sequence with the hint number.
109 </p>
112 But hinting is for more than just hyperlinks. Conkeror provides
113 several <em>hint classes</em> for operating on different types of
114 elements. The hint class is specified by typing the corresponding
115 key sequence of the class before the key sequence of the command.
116 It was not necessary to specify a hint class for following the
117 hyperlink above because links are the default hint class for the
118 follow command. The following table lists the most common hint
119 classes.
120 </p>
122 <table>
123 <tr><td><em>key</em></td><td><em>hint class</em></td><td><em>mnemonic</em></td></tr>
124 <tr><td><code class="key">n</code></td><td>links and form elements</td><td>li<b>n</b>k</td></tr>
125 <tr><td><code class="key">i</code></td><td>images</td><td><b>i</b>mage</td></tr>
126 <tr><td><code class="key">m</code></td><td>frameset frames and top window</td><td>fra<b>m</b>e</td></tr>
127 <tr><td><code class="key">* *</code></td><td>dom nodes</td><td>wildcard</td></tr>
128 </table>
131 In the hinting system, hint number zero (0) is special. It refers to the
132 current URL in the buffer.
133 </p>
136 The <code class="key">c</code> key is bound to the copy command. Its
137 default hint class is links. To copy the URL of the page you are
138 currently browsing, type <code class="key">c 0</code>. To copy the url of
139 a frame or iframe, type <code class="key">m c</code>. If there is more
140 than one frame visible, you will be prompted for a number, just as with
141 hyperlinks.
142 </p>
145 When none of the conventional hint classes cover the element that
146 you want to operate on, you can use the dom-nodes hint class, to
147 choose from among all visible dom nodes. This hint class is bound
148 to <code class="key">* *</code>. Try copying the text of this
149 paragraph now by typing <code class="key">* * c</code> followed by
150 the hint number for this paragraph.
151 </p>
154 <h3>Finding Text (Isearch)</h3>
156 <code class="key">C-s</code> invokes interactive text search mode, isearch
157 for short. <code class="key">C-r</code> invokes reverse isearch. In this
158 mode, just type the text you want to find into the minibuffer and Conkeror
159 will search the document as you type. To jump to the next match,
160 hit <code class="key">C-s</code> again. To jump to the previous match,
161 hit <code class="key">C-r</code>. To conclude your search,
162 hit <code class="key">return</code>, or to abort it,
163 press <code class="key">escape</code> or <code class="key">C-g</code>. If
164 you have previously concluded an isearch, you can use the
165 keys <code class="key">S</code> and <code class="key">R</code> to jump to
166 next and previous matches without going back into isearch mode. This is
167 called non-interactive resume. To resume your last successful isearch in
168 interactive mode, hit <code class="key">C-s</code>
169 or <code class="key">C-r</code> twice.
170 </p>
172 <h3>Copying Text</h3>
174 Apart from <code class="key">* * c</code> described above, there are other
175 ways to copy text for times when what you want to copy does not neatly
176 fill one dom node. The process is straight-forward. First, use isearch
177 (<code class="key">C-s</code>) and search for the start of the text you
178 want to copy. When you have brought the search to the start of the text
179 you want to copy, hit <code class="key">return</code> to conclude the
180 search. Although no cursor is visible, there is an invisible cursor where
181 the search concluded. Hold the <code class="key">shift</code> key and use
182 the arrow keys to make a selection. When you have selected the text you
183 want to copy, release all keys and hit <code class="key">M-w</code> to
184 copy the text to the clipboard.
185 </p>
188 <b>Tip:</b> Although isearch is usually the quickest way to position the
189 cursor, there are other ways. One of them is to use the <em>focus
190 link</em> browser-object command (<code class="key">n ;</code>). When you
191 focus a link, the invisible cursor will be left at the first character of
192 the link text, and you can use shifted arrow keys to make a selection from
193 that point. If the methods outlined so far are unsuitable for a situation
194 you encounter, then you can use <code>M-x caret-mode</code> to get a small
195 but visible blinking cursor that you can move to where you need it.
196 Call <code>M-x caret-mode</code> again to toggle it off.
197 </p>
199 </body>
200 </html>