Webcuts by Henrik Bengtsson, 2002-2006

Webcuts are keyboard sequences that allows you to browse the web without using the mouse. You can think of the as shortcuts accessed by the keyboard. Webcuts is also the name of the small Javascript plug-in. You can follow a link by just typing a substring of the link and pressing [ENTER] or the number next to the links that are automatically added/removed when pressing 0. The currently matching link will be highlighted. No more Computer Related Repetitive Strain Injuries (RSI) from my pages!


[ENTER]Click on the current link.
substring Go to on first link name that best matches substring (case insensitive).
Ctrl+GCycle through all links that match substring.
Toggle index annotation ON/OFF.
numberGo to on link number. Requires that index annotation is ON.
+ [ENTER]Open a small help page.
+ [ENTER]Reload current page.
.. + [ENTER]Go to parent URL.
-number + [ENTER]Go number steps back (i.e. as "Back"). If number is excluded it is equal to -1.
+number + [ENTER]Go number steps forward (i.e. as "Forward"). If number is excluded it is equal to +1.
?some text + [ENTER]Search google for "some text".
webcuts + [ENTER]Go to Webcuts home page (this page).
closepage + [ENTER]Close current page.

Any other unknown or unmatched key sequences are just ignored.


Webcuts is solely written in Javascript and requires that the browser has Javascript enabled. Webcuts has been written for NS4+ and IE4+ browser and it has sucsessfully been tested on Netscape 6.2, Mozilla 1.0-1.3, Internet Explorer 6. It is also known to not work on Netscape 3, Netscape 4, Netscape 4.75, Opera 4 and Opera 6. Please report more success and failure stories to me.


Webcuts by Henrik Bengtsson can be freely added to webpages anywhere. <%-- owned or hosted by anyone since it is published under the GNU General Public License (GPL). --%> Even though I dislike that Webcuts is put on webpages that supports the death penalty or the weapon industry, I can not forbid it (but at least I made my political statment). Webcuts can not be sold by anyone what so ever. Enjoy Webcuts!

Download and Install

The Webcuts is just one tiny Javascript file, namely Webcuts.js. To add the functionality to your webpage just add the following script line inside the head tag:

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

Automatically enumerate links when page loads

To automatically annotate the links (anchors) when the page is loaded use the onLoad attribute in the body tag as below:

 <body onLoad="return(annotateAnchors());">

Add non-visable webcuts to a page

It is also possible to add hardcoded webcuts to a webpage. Hardcoded webcuts are links that are responsive to the keyboard but not visible. The below code adds the webcuts sequence 'author' to link to the page http://www.maths.lth.se/~hb/. Note that the <script> tag must occur after the loading of the Webcuts.js script.

   <script type="text/javascript" src="Webcuts.js" language="JavaScript1.2"></script>
   <script type="text/javascript" language="JavaScript1.2">
     webcuts['author'] = "http://www.maths.lth.se/~hb/";

Control the style of the enumerated links

To be able to control the style of the link annotations each annotation has the style sheet (CSS) class WebcutsLink. Example how to color the annotations red and set the font to be small:

   .WebcutsLink {
     font-size: x-small;
     color: #ff0000;

Protect certain links from being enumerated

The anchors, i.e. the <A href="...">...</A"> tags, are automatically annotated with an automatically generated number, which works as a shortcut. Typing the number and then [ENTER] will "click" the link. Anchors within nodes, i.e. HTML tags, with class WebcutsHide will not be annotated. This is for instance how the footer links at the bottom of this page are excluded from the automatic annotationing.

 <div class="WebcutsHide">
  Some One, <a href="mailto:someone@somewhere.com">someone@somewhere.com</a>

To do

External links

Version history

URL: http://www.maths.lth.se/tools/webcuts/, Email: hb@maths.lth.se