diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-03-16 19:41:03 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-03-16 19:44:29 +0100 |
commit | 64ee41446def1605a71d49fce6461b8ff3f5c0d2 (patch) | |
tree | 78acef7be5dcd510354d61b81d2f6ca84963cbe0 /doc | |
parent | 746d7d1caf0fd0fb767a359f0eb5534ae2d8e653 (diff) | |
download | sciteco-64ee41446def1605a71d49fce6461b8ff3f5c0d2.tar.gz |
implemented function key masking (context-sensitive function key macros)
* fnkeys.tes has been updated to enable the command line
editing macros (cursor keys, etc.) only in the "start" state.
This avoids the annoying effect of inserting the macros
into string arguments where they have no effect and must be
rubbed out again.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/sciteco.7.template | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/doc/sciteco.7.template b/doc/sciteco.7.template index 288c3dd..a9bc944 100644 --- a/doc/sciteco.7.template +++ b/doc/sciteco.7.template @@ -223,6 +223,39 @@ in long Q-Register names. The names are all derived from key definitions of the curses library \(em not all of them may be supported on any particular user interface. +.LP +By default function key macros are effective everywhere \(em +pressing a function key has the same effect as processing +the characters of the corresponding function key macro as +immediate editing commands (or self-inserting characters). +However function key macros that rewrite the current command line +will only work correctly from specific \*(ST parser states. +\*(ST therefore allows you to mask function key macros in +specific parser states by evaluating the Q-Register's numeric +part, thus allowing you to control \fIwhere\fP a function key +macro is effective. +The numeric part represents a bitmask of states where +function keys are \fIdisabled\fP (so the default value 0 +enables that function key everywhere). +\*(ST defines the following state flags: +.IP 1 4 +Bit 0 represents the \(lqstart\(rq state where \*(ST accepts the +beginning of a command. +This is the state you will want command line editing macros +to be enabled in. +.IP 2 +Bit 1 represents any string argument. +.LP +All other bits/flags represent any other parser state. +Consequently, setting the register to the inverse of a bitmask of +state flags enables the corresponding macro only for the specified +states. +For instance, to enable the \(lq^FRIGHT\(rq function key macro +only in the \(lqstart\(rq state, you could set: +.EX +1^_U[^FRIGHT] +.EE +.LP A set of useful Function Key Macros are provided in the standard library .BR fnkeys.tes . |