Hi Carl,
Actually yes, there are many situations that can cause the editor to
quit. Character codes in the range 32 .. 128 (normal printable
characters) get displayed as normal. The rest (in the range 0..31 and
>128) get interpreted differently.
#litc kKeyDel of edDel endof
8 of -1 edLR endof
9 of 1 edLR endof
10 of 1 edUD endof
11 of -1 edUD endof
13 of 13 edDoDispKey endof
#litc kKeyMark of edMark endof
#litc kKeyCopy of edCopy endof
#litc kKeyCmd of drop #litc kKeyExe 1 endof
#litc kKeyComplete of 1 endof
drop 0 ( no refresh)
In version 0.98 includes the following:
kKeyLeft = code 8.
kKeyRight= code 9.
kKeyDown = code 10.
kKeyUp = code 11.
kKeyEnter = code 13.
kKeyRep = code 0xD2 (inverse R).
kKeyCopy = code 0xC3 (inverse C).
kKeyMark = code 0xCD (inverse M)
kKeyDel = code 7.
kKeyCmd = code 0xAB (inverse +)
kKeyCtrl = code 0xDE (inverse ^)
kKeyEsc = code 27.
kKeyExe = code 0x8D (inverse '\r')
kKeyPrev = code 0xE (shift, left)
kKeyNext = code 0xF (shift, right)
kKeyPgDn = code 0x10 (shift, down)
kKeyPgUp = code 0x21 (shift, up)
kKeyComplete = code 0xA0 (inverse space, which you get by shift, space).
Many of these you're already aware of. The design of the editor (and
the command line editor) is such that it can be extended by wrapping
the code with other definitions.
The core editor, ed, can handle cursor control as well as mark and
copy. It always quits when the user presses a key it can't properly
process. ed is an invisible word, though you can see its definition in
github and will have a kern vector in 0.9.8.
edit calls ed and if the keypress on exit was kKeyCmd it processes a command.
boxed and query don't handle commands at all, but boxed returns the
exit code so you can write new definitions which do handle them. The
intention is that the new keypresses, things like kKeyEsc, kKeyPrev,
kKeyNext can handle things like form processing at an application
level; kKeyEsc being used for Cancel, with kKeyPrev and kKeyNext to
move between fields.
In addition, ed in version 0.9.8 is modified to support a
user-definable key handler. In edit it's used to support command
completion, so typing the beginning of a word will trigger the list of
words that begin with what you've typed to appear in the bottom four
lines and pressing kKeyComplete (shift, space) will complete the
command. Boxed and query don't support that feature. Command
completion is accomplished using a new version of vlist which lists
words that start with the text that follows it. For example:
vlist <exe> will list all the commands as normal.
vlist a<exe> will list all the commands beginning with 'a'.
vlist d.<exe> will list all the commands beginning with 'd.' (which I
think is d. and d.r).
etc.
So, onto the question in hand. Any other kind of keypress in the range
0..31 that's not handled by ed will quit the editor. So, <CR><LF>
won't quit the editor, <CR> is interpreted correctly and <LF> will
move onto the next line (or end of text), which if you're at the end
of the text already will have no effect. But <FF> form feed, code 12,
would cause the editor to exit; as will kKeyEsc, kKeyPrev, kKeyNext,
kKeyPgUp, kKeyPgDn. However, from query this should merely cause
FIGnition to begin interpreting the text you typed.
-cheers from julz
> --
> You received this message because you are subscribed to the Google Groups "FIGnition" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
fignition+...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>