Lugaru's Epsilon
Programmer's
Editor

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

Previous   Up    Next
Updating from Epsilon 4  Commands by Topic   Mouse Keys


Epsilon User's Manual and Reference > Commands by Topic > Advanced Topics >

Keys and their Representation

This section describes the legal Epsilon keys, and the representation that Epsilon uses when referring to keys and reading command files. The key representation used when writing extension language programs appears in Keys.

Epsilon recognizes a total of 684 distinct keys you can type on the keyboard (including control and alt keys). You can bind a command to each of these keys. Each key can also function as a prefix key to allow an additional 684 keys accessible through that key.

First, the keyboard provides the standard 128 ASCII characters. All the white keys in the central part of the PC keyboard, possibly in combination with the Shift and Control keys, generate ASCII characters. So do the <Esc>, <Backspace>, <Tab>, and <Enter> keys. They generate Control [, Control H, Control I, and Control M, respectively. Depending upon the national-language keyboard driver in use, there may be up to 128 additional keys available by pressing various combinations of Control and AltGr keys, for a total of 256 keys.

 <Ins>  <Insert>    
 <End>      
 <Down>      
 <PgDn>  <PageDn>  <PgDown>  <PageDown>
 <Left>      
 <Right>      
 <Home>      
 <Up>      
 <PgUp>  <PageUp>    
 <Del>  <Delete>    

You can get an additional 256 keys by holding down the Alt key while typing the above keys. In Epsilon, you can also enter an Alt key by typing an <Esc> before the key. Similarly, the Control-^ key says to interpret the following key as if you had held down the Control key while typing that key.

If you want to enter an actual <Esc> or Control-^ instead, type a Control-Q before it. The Ctrl-Q key "quotes" the following key against special interpretations. See Bindings.

In command files and some other contexts, Epsilon represents Control keys by C-<char>, with <char> replaced by the original key. Thus Control-t appears as C-T. The case of the <char> doesn't matter for control characters when Epsilon reads a command file, but the C- must appear in upper case. The Delete character (ASCII code 127) appears as C-?. Note that this has nothing to do with the key marked "Del" on the PC keyboard. The Alt keys appear with A- appended to the beginning of their usual symbol, as in A-f for Alt-f and A-C-h for Alt-Control-H.

Epsilon represents function keys by F-1, F-2, ... F-12. The F must appear in upper case. You can also specify the Shift, Control, and Alt versions of the function keys. When typing a function key, Epsilon only recognizes one "modifier." If you press the Alt key down, Epsilon ignores the Control and Shift keys, and if you press the Control key down, Epsilon ignores the Shift key. You can specify 48 keys in this way. In a command file, you specify the Shift, Control, and Alt versions with a prefix of S-, C-, or A-, respectively. For example, Epsilon refers to the key you get by holding down the Shift and Alt keys and pressing the F8 key as A-F-8.

Keys on the cursor keypad work in a similar way. Epsilon recognizes several synonyms for these keys, as listed in the table. Epsilon generally uses the first name listed, but will accept any of the names from a command file. Epsilon recognizes Control, Shift, and Alt versions of these keys as well, and indicates these with a prefix of C-, S-, or A-, respectively. You can only use one of these prefixes at a time.

Epsilon normally treats the shifted versions of these keys as synonyms for the unshifted versions. When you press Shift-<Left>, Epsilon runs the command bound to <Left>. The commands bound to most of these keys then examine the Shift key and decide whether to begin or stop selecting text. (Holding down the shift key while using the cursor keys is one way to select text in Epsilon.) In a macro, Epsilon indicates that a cursor key was shifted using the E- prefix. You can make Epsilon treat shifted cursor keys as entirely separate keys using the program-keys command, described in the next section.

Epsilon doesn't distinguish between the keys of a separate cursor pad and those of the numeric key pad unless you use the -ke switch, described in Epsilon Command Line. If you use -ke, Epsilon refers to the numeric keypad keys with the names given in the table. Whether or not you use -ke, Epsilon refers to the numeric keypad's 5 key (which doesn't exist on the cursor pad) as N-5.

Epsilon actually does distinguish between the numeric pad and the cursor pad, even if you don't use -ke, in one case. Under DOS and OS/2, you can use the program-keys command to enable entering graphic characters by holding down Alt and typing their codes on the numeric keypad (see Altering Keys). That won't affect the Alt versions of the cursor pad keys. You can still bind Epsilon commands to those keys.

 N-<Ins>  N-<Insert>  N-0    
 N-<End>  N-1      
 N-<Down>  N-2      
 N-<PgDn>  N-<PageDn>  N-<PgDown>  N-<PageDown>  N-3
 N-<Left>  N-4      
 N-5        
 N-<Right>  N-6      
 N-<Home>  N-7      
 N-<Up>  N-8      
 N-<PgUp>  N-<PageUp>  N-9    
 N-<Del>  N-<Delete>  N-.    

The numeric keypad has a dual nature, in that it can function as both a cursor pad and a numeric pad. The <Num Lock> key switches between these two functions. You can temporarily change the state of <Num Lock> with either Shift key. With the Control or Alt keys depressed, Epsilon always generates cursor keys, and ignores the <Num Lock> and Shift keys.

As usual, the <Caps Lock> key reverses the action of the shift key when used to modify alphabetic characters.

In a command file, you can also represent keys by their conventional names, by writing <Newline> or <Escape>, or by number, writing <#0> for the null character ^@, for example. Epsilon understands the same key names here as in regular expression patterns (see the table in Regular Expressions).

Macros defined in command files may also use the syntax <!cmdname> to run a command cmdname without knowing which key it's bound to. For example, <!find-file> runs the find-file command. When you define a keyboard macro interactively and invoke commands from the menu bar or tool bar, Epsilon will use this syntax to define them, since there may be no key sequence that invokes the specified command.

Several keys on the PC keyboard act as synonyms for other keys: the grey keys *, -, and + by the numeric keypad, and the <Backspace>, <Enter>, <Tab>, and <Esc> keys. The first three act as synonyms for the regular white ASCII keys, and the other four act as synonyms for the Control versions of "H", "M", "I" and "[", respectively. Epsilon normally translates these keys to their synonyms automatically, but you can change this using the program-keys command, described in the next section.

Under DOS, the <Scroll Lock> key halts the currently running command, if possible, just like the abort command. The command itself must check for an abort request (as most commands that take a long time do). Control-<Scroll Lock> starts the extension language debugger on the currently running function. For this to work, you need to have compiled the function using EEL's -s flag.

Under OS/2, <Scroll Lock> does nothing. Control-<Scroll Lock> asks you whether to abort the current command like abort, start the extension language debugger, immediately exit Epsilon, or do nothing.

You cannot bind commands to the special <Scroll Lock> and Control-<Scroll Lock> keys. They always behave as described.



Previous   Up    Next
Updating from Epsilon 4  Commands by Topic   Mouse Keys


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