Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

PAD_$DEF_PFK                      Domain/OS                       PAD_$DEF_PFK


NAME
     pad_$def_pfk - define a program function key

SYNOPSIS (C)
     #include <apollo/base.h>
     #include <apollo/pad.h>

     void pad_$def_pfk(
          ios_$id_t &stream_id,
          char *key_name,
          char *definition,
          short &def_len,
          status_$t *status)


SYNOPSIS (Pascal)
     %include '/sys/ins/base.ins.pas';
     %include '/sys/ins/pad.ins.pas';

     procedure pad_$def_pfk(
          in stream_id: ios_$id_t;
          in key_name: pad_$key_name_t;
          in definition: univ pad_$key_def_t;
          in def_len: integer;
          out status: status_$t);

SYNOPSIS (FORTRAN)
     %include '/sys/ins/base.ins.ftn'
     %include '/sys/ins/pad.ins.ftn'

           integer*4 status
           integer*2 stream_id, def_len
           character key_name*4, definition*128

           call pad_$def_pfk(stream_id, key_name, definition,
          &                  def_len, status)

DESCRIPTION
     Pad_$def_pfk defines the program function key specified by key_name while
     in the window viewing the pad designated by stream_id.  Pressing a key
     defined in the current window executes the Display Manager command in
     definition.  Program function keys defined by pad_$def_pfk behave like
     keys defined via the Display Manager command KD (Key Definition) except
     that the definition is only effective when the cursor is within windows
     viewing the pad designated by stream_id.  Key definitions remain in
     effect after the program finishes executing unless reset by the program
     at termination.

     stream_id
          The key definition is only effective when the cursor is in windows
          on the pad designated by stream_id.

     key_name
          The 4-character name of the key to define.  The rules for naming
          keys in pad_$def_pfk differ from the rules for naming keys in the KD
          Display Manager command.  That command implicitly converts letters
          to uppercase and allows the use of single quotation marks.  Use
          uppercase letters (for example, F1) except when redefining a lower-
          case letter key (such as x).  Pad_$def_pfk does not interpret quota-
          tion marks in key_name, so do not use quotes except to redefine the
          quote keys.

     definition
          The Display Manager command to execute whenever the key is pressed.
          The Display Manager command string in definition is often the ES
          command followed by a text string to let the program function key
          simulate the typing of that text.  Definition may also specify the
          ER command, which introduces a 2-digit hexadecimal number and feeds
          that value directly to the calling process when the user presses the
          key.  The ER command essentially enables raw-mode input of the
          specified value, with no echoing or other processing by the Display
          Manager.

     def_len
          The number of bytes in definition.  Specify a length of 0 to restore
          the key definition that was active before the program was invoked.

     status
          The completion status.

SEE ALSO
     pad_$dm_cmd, pad_$inq_kbd.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026