[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4. Smart Keys

Hyperbole provides two special Smart Keys that perform context-sensitive operations, the Action Key and the Assist Key. By default, the Action Key is bound to your shift-middle mouse button (or shift-left on a 2-button mouse) and the Assist Key is bound to your shift-right mouse button, assuming Hyperbole is run under an external window system. (InfoDock users should use the middle mouse button as the Action Key, instead.)

Mouse configuration is automatic for InfoDock, XEmacs, and Epoch under the X window system and for GNU Emacs versions 18 and 19 under X, OpenWindows, NEXTSTEP, SunView and Apollo's Display Manager, assuming your Emacs program has been built with support for any of these window systems. The command, hmouse-shift-buttons, can be used to select between shifted and unshifted Smart Mouse Keys.

By default (if hkey-init is set to t in `hsite.el'), then {M-RET} may also be used as the Action Key and {C-u M-RET} may be used as the Assist Key. In many read-only modes like Dired and Rmail, {RET} also functions as the Action Key. These key bindings allow context sensitive operation from any keyboard.

If you prefer other key bindings, simply bind the commands action-key and assist-key to keyboard keys. hkey-either may be used instead if you prefer a single key binding for both commands; a prefix argument then invokes assist-key.

You may also bind action-mouse-key and assist-mouse-key to mouse keys, as you like.

The Action Key generally selects entities, creates links and activates buttons. The Assist Key generally provides help, such as reporting on a button's attributes, or serves a complementary function to whatever the Action Key does within a context.

You can get a summary of what the Smart Keys do in all of their different contexts by pressing the Assist Key in the right corner (within the rightmost 3 characters) of a window modeline or by using the Hyperbole Doc/SmartKy menu entry.

The following table is an example of this summary. Much of the browsing power of Hyperbole comes from use of the Smart Keys, so you should spend some time practicing how to use them. This table may appear daunting at first, but as you practice and notice that the Smart Keys do just a few context-sensitive things per editor mode, you will find it easy to just point and click and let Hyperbole do the rest.

For extensive reference documentation on the Smart Keys, B. Smart Key Reference.

                                             Smart Keys
Context                         Action Key                 Assist Key
  On a menu item                Item is activated          Item help
  On an explicit button         Button is activated        Button help
  Reading argument
    1st press at an arg value   Value copied to minibuffer <- same
    2nd press at an arg value   Value used as argument     <- same
    In minibuffer               Minibuf arg is applied     Completion help
  On an implicit button         Button is activated        Button help
  Within an outline cell        Collapses and expands      Shows tree props
  Left of an outline cell       Creates a klink            Moves a tree
  Wrolo Match Buffer            Edits entries and mails to e-mail addresses

Mouse or Keyboard Display Control
  Line end, not end of buffer
      = t   (default)           Makes curr line top line   Bottom line
      = nil                     Scrolls up a windowful     Scrolls down
  End of Any Help buffer        Screen restored to previous state

Mouse-only Control
  Modeline down & wind release  Resize window height       <- same
  Drag from shared window side
    or from left of scroll bar  Resize window width        <- same
  Drag between windows          Create/modify a link but   Swap window buffers
  Horizontal drag within window
    Left to right               Scroll to buffer end       Split window across
    Right to left               Scroll to buffer begin     Delete window
  Vertical drag within window   Split window sideways      <- same
  Diagonal drag within window   Save ring screen-config    Restore ring config
  Click in modeline
    Left window edge            Bury buffer                Unbury bottom buf
    Right window edge           Info                       Smart Key summary
    Otherwise                   Action Key Hook            Assist Key Hook

Special Modes
  C/C++ Mode                    Jumps to id/include def    Jumps to next def
  Assembly Language Mode        Jumps to id/include def    Jumps to next def
  Any Lisp mode                 Jumps to id def            Jumps to next def
  Emacs Lisp Compiler Error     Jumps to def with error    <- same
  Grep or Occur match           Jumps to match source line <- same
  Multi-buffer occur match      Jumps to match source line <- same
  Outline Major/Minor Modes     Collapses, expands, and moves outline entries
  Man Apropos                   Displays man page entry    <- same
  Man Pages                     Follows cross refs, file refs and C code refs
  Buffer Menu                   Saves, deletes and displays buffers

Emacs Info Reader
  Menu Entry or Cross Ref       Jumps to referent          <- same
  Up, Next or Prev Header       Jumps to referent          Jumps to prior node
  File entry of Header          Jumps to top node          Jumps to (DIR) node
  End of current node           Jumps to next node         Jumps to prev node
  Anywhere else                 Scrolls up a windowful     Scrolls down a wind

  Calendar                      Scrolls or shows appts     Scrolls/marks dates
  Dired Mode                    Views and deletes files from directory listing
  GNUS News Reader              Toggles group subscriptions, gets new news,
                                  and browses articles
  Mail reader and Summaries     Browses, deletes and expunges messages
  OO-Browser                    Browses classes and elements
  Tar Mode                      Views and edits files from tar archive files

Any other context (defaults)    Hyperbole top menu         Smart Key summary

Note how the last line in the table explains the default behavior of the Smart Keys. That is what they do when they cannot find a context match at your current location. See the documentation for the variables action-key-default-function and assist-key-default-function for information on how to customize the behavior of the Smart Keys within default contexts.

A prime design criterion of Hyperbole's user interface is that one should be able to see what an operation will do before using it. The Assist Key shows you what a button or minibuffer menu item will do before you activate it. Hyperbole also shows the result of directly selecting an argument value with the mouse, to provide feedback as to whether the right item has been selected. A second click is necessary before an argument is accepted and processed.

When you use a mouse and you want to find out what either of the Smart Keys does within a context, depress the one you want to check on and hold it down, then press the other and release as you please. A help buffer will pop up explaining the actions that will be performed in that context, if any. A press of either Smart Key at the end of that help buffer will restore your display to its configuration prior to invoking help.

By default (if hkey-init is left set equal to t in `hsite.el'), then {C-h A} will display this same context-sensitive help for the Action Key while {C-u C-h A} will display the help for the Assist Key. Note that {C-h a} will perform a function unrelated to Hyperbole, so you must press the shift key when you hit the A character.

When Hyperbole is installed, a key may be bound which allows you to switch between the Smart Key mouse bindings and your prior ones. C-h w hmouse-toggle-bindings RET should show you any key which performs this command. If no key binding has been established or if you prefer one of your own, simply select a key and bind it within your `~/.emacs' file. For example, (global-set-key "\C-ct" 'hmouse-toggle-bindings).

[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by XEmacs Webmaster on October, 2 2007 using texi2html