ACCC Home Page ACADEMIC COMPUTING and COMMUNICATIONS CENTER
Accounts / Passwords Email Labs / Classrooms Telecom Network Security Software Computing and Network Services Education / Teaching Getting Help
 

THE - The Hessling Editor
Key Bindings

 

Introduction

XEDIT users are familiar with program function keys PF1 - PF24 on CMS. These function keys are part of the IBM 3270 protocol and do not exist as such on UNIX systems. UNIX provides for the definition of 64 function keys, F0 - F63, plus the four keys PF1, PF2, PF3 and PF4, but their use is not well supported. The implementation is dependent on defining your terminal type to the UNIX environment and how well your terminal emulation software emulates the terminal it claims it does. Learning how to use your particular software and keyboard combination may be reminicent of first using UICVM in fullscreen mode.

Local Enhancements

THE at UIC has been customized to recognize escape sequences. Click here to see a table of those escape sequences.

Keys as recognized by THE

THE provides a way to define a command for any key on your keyboard that the system recognizes. The 64 UNIX function keys are mapped as follows:
  • f0 - f14 are simply recognized as F0 - F14
  • f15 is recognized as "Help"
  • f16 is recognized as "Do"
  • f17 - f20 are recognized as F17 - F20
  • f21 - f40 are recognized as the shifted case versions of f1 - f20, e.g. S-F1 - S-F20
  • f41 - f63 are simply recognized as F41 - F63
though it is unlikely you will find all of these on your keyboard.

The alphebetic keys are recognized as their letter name, preceded by "S-" if shifted and "C-" if entered while the "control" key is depressed. The numeric and punctuation keys are all recognized as their regular name.

Special keys such as "Page Up", "Enter", "Tab", etc. are recognized by special names which will have to be discovered experimentally as these names will vary depending on your terminal type or emulation software.

Default Control Key Definitions

Besides function keys, THE recognizes control keys. These are the alphabetic keys entered while holding down the "ctl" or "ctrl" key. The standard THE definitions are as follows:
   C-A             sos cursoradj      
   C-B             mark box           
   C-C             copy block reset   
   C-D             duplicate 1 block  
   C-E             sos delend         
   C-F             fillbox            
   C-G             delete block       
   C-H             sos delchar        
   C-I             sos tabf           
   C-J             join aligned       
   C-K             copy block         
   C-L             mark line          
   C-M             enter              
   C-O             overlaybox         
   C-P             sos doprefix       
   C-Q             sos undo           
   C-R             redraw             
   C-S             split aligned      
   C-U             reset block        
   C-V             move block reset   
   C-W             sos delword        
   C-X             sos edit           
   C-Z             suspend            
Note that some special keys such as "enter" and "tab" normally generate these control keys, e.g. pressing the "enter" key actually sends "C-A", therefore, if you define "C-A" to be something other than "enter" you have also redefined the function of the "enter" key.

Also note that some control keys are interpreted by the operating system and never get passed on to the editor. By default on tigger this includes "C-S", which stops terminal output, and "C-Q", which resumes terminal output. If you stop receiving terminal output and none of your keystrokes are being displayed it may be because you accidently entered "C-S". You can recover from this by entering "C-Q".

Discovering what key does what - the SHOWKEY command

Because of differences in the environment, THE does not provide the QUERY PFKEYS command present in XEDIT. Entering the command SHOWKEY (or just SHOW) on the command line will prompt the user to enter a key and respond with the key name and any assigned command. To exit from SHOWKEY, press the space bar.

Binding a command to a key - the DEFINE command

The DEFINE command allows the user to assign one or many commands and optional parameter(s) to a key. Commands may be abbreviated. With no arguments, any existing definition for that key is removed and the key reverts back to its default assignation (if it had any). Key-names correspond to the key name shown with the SHOWKEY command.

Some examples

  • To define "control T" to go to the top of the file:

          define c-t top
  • To define "control G" to erase to the end of the line:

          define c-g sos delend
  • To define "F24" to quit the editor without saving any changes:

          define f24 qquit
NOTE: THE will recognize all 64 function keys defined by the names f0 - f63, even though the SHOWKEY command will report the key by a different name, i.e. f24 is interpreted the same as S-F4.


Return to the index.


The Hessling Editor is Copyright © Mark Hessling, 1990-1998 <M.Hessling@qut.edu.au>
Last modified: April 9, 1999
 


2000-2-16  document@uic.edu
UIC Home Page Search UIC Pages Contact UIC