URL: http://www.firstbasesoftware.com/man/man5/keyboard.htm
Last modified: 12 September 1995
Copyright © by FirstBase Software.
[ Index of Contents] [ FirstBase RDBMS Overview]


NAME

keyboard - FirstBase keyboard map file

SYNOPSIS

.firstbase-kbmap

DESCRIPTION

The keyboard map file is used to bind keystroke sequences to FirstBase actions and intraline editing commands. This map file is used with the Editable Input mode within FirstBase. See setup(5) and input(5) on how to enable this input mode.

When a FirstBase tool is used with Editable Input, the keyboard map is loaded from a .firstbase-kbmap file located in either the $HOME directory, somewhere along $PATH, or in the FirstBase home directory, in this order. The first file located is loaded.

KEYBOARD MAP

The FirstBase keyboard map is a list of keyboard keystrokes, or sequences, and Editable Input commands, or actions. A sequence is bound to an action using the following syntax:

      setkey "sequence" action

The setkey must be in the first character column -- these are the only lines that will be processed. Blanks and tabs are used to separate the sequence and action parts of each setkey line. Comments beyond the action are started using a pound sign (#).

SEQUENCE

Each sequence is a series of characters delimited with double quotations. These characters (between the quote marks) represent complete escape and control keystroke sequences.

The first character of each sequence must be some kind of control character. Subsequent characters can be of any type. Function keys and arrow keys are in this category.

Control characters are denoted using one of the following:

   \^  .... Control
   \e  .... Escape
   \^? .... Del
   \   .... \

For example, the sequence \^f represents <CONTROL>-F, and \ek represents <ESCAPE>-k. In these examples, the <CONTROL> character is depressed while typing the f character, but the <ESCAPE> is a single keystroke by itself, followed by the single keystroke k.

A sequence can be as long as needed. Furthermore, multiple sequences can be bound to the same action.

ACTION

The action part of a setkey line represents a FirstBase signal or an intraline editing command. Each action is a single word, or set of hyphenated words with no blanks. The following is a complete set of all actions allowed along with a few comments.

beginning-of-line

end-of-line

delete-char-forward

delete-char-backward

delete-to-beginning-of-line

delete-to-end-of-line

move-char-forward

move-char-backward

delete-word-forward

delete-word-backward

move-word-forward

move-word-backward

quit
quit from middle of command sequence

upcase-word

capitalize-word

downcase-word

end
general END signal

help
general HELP signal

abort
general ABORT keystroke

next
next field, database editors

prev
previous field, database editors

redraw

pagedown
database editors - pages, choice pages, etc.

pageup
database editors - pages, choice pages, etc.

bsignal
database editors - backward record

fsignal
database editors - forward record

ssignal
database editors - next matching record

qsignal
database editors - ratio of matching records

writerec
database editors - write record

deleterec
database editors - delete record

system-stop
UNIX stop - .firstbase-init controlled

system-interrupt
UNIX interrupt - sometimes allowed

SAMPLE KEYBOARD MAP

The following is a sample keyboard map. This map represents the standard FirstBase keyboard bindings as released with FirstBase.

# intraline editing commands
setkey "\^a"	beginning-of-line
setkey "\^e"	end-of-line
setkey "\^d"	delete-char-forward
setkey "\^?"	delete-char-backward
setkey "\^u"	delete-to-beginning-of-line
setkey "\^k"	delete-to-end-of-line
setkey "\^f"	move-char-forward
setkey "\^b"	move-char-backward
setkey "\ed"	delete-word-forward
setkey "\e\^?"	delete-word-backward
setkey "\^w"	delete-word-backward	# overload function 
setkey "\ef"	move-word-forward
setkey "\eb"	move-word-backward
setkey "\^g"	quit
setkey "\eu"	upcase-word
setkey "\ec"	capitalize-word
setkey "\el"	downcase-word

# standard FirstBase signals
setkey "\e-"	end
setkey "\^h"	help
setkey "\^c"	abort                # general abort keystroke
setkey "\^n"	next                 # next field, dbedit
setkey "\^p"	prev                 # prev field, dbedit
setkey "\^l"	redraw
setkey "\^v"	pagedown             # dbedit data/choice pages ...
setkey "\ev"	pageup               # dbedit data/choice pages ...
setkey "\^x\^b"	bsignal              # backward record, dbedit
setkey "\^x\^f"	fsignal              # forward record, dbedit
setkey "\^x\^s"	writerec             # dbedit writerec
setkey "\^x0"	deleterec            # dbedit delete record

setkey "\eh"	help

# UNIX system signals
setkey "\e\^z"	system-stop          # UNIX stop. setup(5).
setkey "\e\^c"	system-interrupt     # UNIX interrupt. sometimes allowed

# Arrow keys - may need tuning to your particular keyboard
setkey "\e[A"	prev                 # example of an arrow key
setkey "\e[B"	next                 # example of an arrow key
setkey "\e[C"	move-char-forward    # example of an arrow key
setkey "\e[D"	move-char-backward   # example of an arrow key

SPECIAL CASES

A few standard FirstBase keystrokes are overloaded and built-in to provide default bindings in certain situations. The following will all be accepted as standard FirstBase signals when no input has been entered (or altered) and such a signal is allowed.

-
END key. FirstBase standard END keystroke.

^F
fsignal. database editors - forward one record.

^B
bsignal. database editors - backward one record.

^D
dsignal. database editors - autodefault signal.

^Q
qsignal. database editors - report pattern matches.

^S
ssignal. database editors - locate next pattern match.

^E
esignal. dbshell - environment screen command.

^H
help. from first column of an input area.

SEE ALSO

input(5), setup(5)

FirstBase User's Guide and Reference Manual


URL: http://www.firstbasesoftware.com/man/man5/keyboard.htm
Last modified: 12 September 1995
Copyright © by FirstBase Software.
[ Index of Contents] [ FirstBase RDBMS Overview]