1.3 Invoking Commands

  • 1.3.1 Key Bindings
  • 1.3.2 Extended Commands
  • In order to get a command to do its thing, it must be invoked. The user can do this two ways, by typing the key to which the command is bound or by using an extended command. Commonly used commands are invoked via their key bindings since they are faster to type, while less used commands are invoked as extended commands since they are easier to remember. [annotate]

    1.3.1 Key Bindings

    A key is a sequence of key-events (see section 18.1) typed on the keyboard, usually only one or two in length. Sections 1.7 and 1.8 contain information on particular input devices. [annotate]

    When a command is bound to a key, typing the key causes Hemlock to invoke the command. When the command completes its job, Hemlock returns to reading another key, and this continually repeats. [annotate]

    Some commands read key-events interpreting them however each command desires. When commands do this, key bindings have no effect, but you can usually abort Hemlock whenever it is waiting for input by typing C-g (see section 1.12). You can usually find out what options are available by typing C-_ or Home (see section 1.10). [annotate]

    The user can easily rebind keys to different commands, bind new keys to commands, or establish bindings for commands never bound before (see section 13.2). [annotate]

    In addition to the key bindings explicitly listed with each command, there are some implicit bindings created by using key translations. These bindings are not displayed by documentation commands such as Where Is. By default, there are only a few key translations. The modifier-prefix characters C-^, Escape, C-z, or C-c may be used when typing keys to convert the following key-event to a control, meta, control-meta, or hyper key-event. For example, C-x Escape b invokes the same commands as C-x M-b, and C-z u is the same as C-M-u. This allows user to type more interesting keys on limited keyboards that lack control, meta, and hyper keys. [annotate]

    Key Echo Delay  (initial value 1.0) [Variable]
              

    A key binding may be composed of several key-events, especially when you enter it using modifier-prefix key-events. Hemlock provides feedback for partially entered keys by displaying the typed key-events in the echo area. In order to avoid excessive output and clearing of the echo area, this display is delayed by Key Echo Delay seconds. If this variable is set to nil, then Hemlock foregoes displaying initial subsequences of keys. [annotate]

    [annotate]

    1.3.2 Extended Commands

    A command is invoked as an extended command by typing its name to the Extended Command command, which is invoked using its key binding, M-x. [annotate]

    Extended Command  (bound to M-x) [Command]
              

    This command prompts in the echo area for the name of a command, and then invokes that command. The prefix argument is passed through to the command invoked. The command name need not be typed out in full, as long as enough of its name is supplied to uniquely identify it. Completion is available using Escape and Space, and a list of possible completions is given by Home or C-_. [annotate]

    [annotate]