Lugaru's Epsilon
Programmer's
Editor

Context:
Epsilon User's Manual and Reference
   Commands by Topic
      . . .
      Repeating Commands
         Repeating a Single Command
         Keyboard Macros
      Simple Customizing
         Bindings
         Brief Emulation
         CUA Keyboard
         . . .
      Advanced Topics
         Changing Commands with EEL
         Updating from an Old Version
         Keys and their Representation
         Altering Keys
         Customizing the Mouse
      . . .

Previous   Up    Next
Keyboard Macros  Commands by Topic   Brief Emulation


Epsilon User's Manual and Reference > Commands by Topic > Simple Customizing >

Bindings

Epsilon allows you to create your own commands and attach them, or any pre-existing Epsilon commands, to any key. If you bind a command to a key, you can then invoke that command by pressing the key. For example, at startup, Epsilon has forward-character bound to the Ctrl-F key. By typing Ctrl-F, the forward-character command executes, so point moves forward one character. If you prefer to have the command which moves point to the end of the current line, end-of-line, bound to Ctrl-F, you may bind that there.

You bind commands to keys with the bind-to-key command, which you can invoke with the F4 key. The bind-to-key command asks you for the name of a command (with completion), and the key to which to bind that command. You may precede the key by any number of prefix keys. When you type a prefix key, Epsilon asks you for another key. For example, if you type Ctrl-X, Epsilon asks you for another key. Suppose you type Ctrl-O. Epsilon would then bind the command to the Ctrl-X Ctrl-O key sequence. Prefix keys give Epsilon a virtually unlimited number of keys.

Epsilon at startup provides Ctrl-X and Ctrl-C as the only prefix keys. You can invoke many commands, such as save-file (Ctrl-X Ctrl-S) and find-file (Ctrl-X Ctrl-F), through the Ctrl-X prefix key. You may define your own prefix keys with the command called create-prefix-command. Epsilon asks you for a key to make into a prefix key. You may then bind commands to keys prefixed with this key using the bind-to-key command. To remove prefix keys, see Command Files.

When you press a prefix key, Epsilon displays the key in the echo area to indicate that you must type another key. Epsilon normally displays the key immediately, but you can make it pause for a moment before displaying the key. If you press another key during the pause, Epsilon doesn't bother displaying the first key.

You control the amount of time Epsilon pauses using the mention-delay variable, expressed in tenths of a second. By default, this variable has a value of zero, which indicates no delay. You may find it useful to set mention-delay to a small value (perhaps 3). This delay applies in most situations where Epsilon prompts for a single key, such as when entering a numeric argument.

The unbind-key command asks for a key and then offers to rebind the key to the normal-character command, or to remove any binding it may have. A key bound to normal-character will self-insert; that's how keys like "j" are bound. A key with no binding at all simply displays an error message.

You may bind a given command to any number of keys. You may invoke a command, whether or not bound to a key, using named-command, by pressing the Alt-X key. Alt-X asks for the name of a command, then runs the command you specified. This command passes any numeric argument you give it to the command it invokes.

The command alt-prefix, bound to <Esc>, gets another key and executes the command bound to the Alt version of that key. You will find this command useful if you must use Epsilon from a keyboard lacking a working Alt key, or if you prefer to avoid using Alt keys. Also, you may find some combinations of control and alt awkward to type on some keyboards. For example, some people prefer to invoke the replace-string command by typing <Esc> & rather than by typing Alt-&.

The command ctrl-prefix, bound to Ctrl-^, functions similarly. It gets another key and converts it into the Control version of that key. For example, it changes "s" into the Ctrl-S key.

Epsilon distinguishes between upper case and lower case keys when determining key bindings. The command case-indirect maps upper case letters and the alt versions of upper case letters to the corresponding lower case keys. It also maps lower case to upper case. If you type a key bound to case-indirect, say Alt-X, it executes the command bound to the corresponding other key, in this case Alt-x. Secondary key tables like Ctrl-X usually bind the upper case letters along with alt versions to case-indirect. This has the effect of making keys you bind to the lower case letters work with both the upper and lower case letter. You can still, however, bind different commands to the different cases. Note that control keys do not have distinct cases: Ctrl-A and Ctrl-a both represent the same key.

Standard bindings:

  Alt-X, F2  named-command
 F4  bind-to-key
   create-prefix-command
   unbind-key
 <Esc>  alt-prefix
 Ctrl-^  ctrl-prefix
   case-indirect
 



Previous   Up    Next
Keyboard Macros  Commands by Topic   Brief Emulation


Lugaru Copyright (C) 1984, 2020 by Lugaru Software Ltd. All rights reserved.