From hb at maths.lth.se  Mon Apr 28 21:06:13 2003
From: hb at maths.lth.se (Henrik Bengtsson)
Date: Mon Apr 28 20:06:16 2003
Subject: [Rd] Webcuts - Navigating HTML help using only the keyboard
Message-ID: <002a01c30db0$db62db40$e502eb82@alpha.wehi.edu.au>

A while ago I put together a Javascript called Webcuts (GPL), which when
included in an HTML document it will make it possible to navigate the
page and follow links by just typing parts of the label of the links,
i.e. no mouse is needed. I have, by using 'sed', added the script to
every HTML help file generated by R as an example, cf.

  http://www.maths.lth.se/help/R/.R/doc/html/packages.html

I find quite convenient since it make it possible to quickly access help
files without having to scroll the browser window and without having to
touch the mouse. 
Try for instance

 0. Click on the above link.
 1. Type "base" -> ENTER and then "ansi" -> ENTER. 
 2. Go back with "-" + ENTER or two steps back with "-2" + ENTER. 
 3. Go to the parent directory by typing ".." + ENTER.
 4. Search google for "R" by typing "?R" + ENTER etc. 
 5. See help for all Webcuts features by typing "?" + ENTER.
 
I've been able to test it on IE6 and Mozilla (also w/ "Find As You
Type"), but it was written for NS4+ and IE4+ so it should work on some
other browsers too. Some browser are also known for not supporting
Webcuts.

To include it on a webpage one just add the line

<head>
   ...
   <script type="text/javascript" src="Webcuts.js"
language="JavaScript1.2"></script>
 </head>

Do you think it would be a useful add Webcuts to the HTML generating
code in R? The natural location of Webcuts.js could be
$R_HOME/doc/html/. If anyone dislikes Webcuts it could be disabled by
replacing Webcuts.js with an empty file.

For more details see http://www.maths.lth.se/tools/webcuts/.

Cheers

Henrik Bengtsson

Dept. of Mathematical Statistics @ Centre for Mathematical Sciences
Lund Institute of Technology/Lund University, Sweden 
(Sweden +2h UTC, Melbourne +10 UTC, Calif. -7h UTC)
+46 708 909208 (cell), +46 46 320 820 (home), 
+1 (508) 464 6644 (global fax),
+46 46 2229611 (off), +46 46 2224623 (dept. fax)
h b @ m a t h s . l t h . s e, http://www.maths.lth.se/~hb/


[Rd] Webcuts - Navigating HTML help using only the keyboard
Henrik Bengtsson