Introduction


Keyboard definitions are fixed, and can only be altered using KEYMAP. Sometimes it could be desirable to alter the definition dynamically. This could be a desire to do so in a full SPFLite macro, or perhaps because several of your key definitions insert the same boilerplate text and it would be convenient to only have to alter the text once.


Keyboard logic supports 10 SET symbols which can be inserted into a keyboard definition using the predefined primitives (SET0) thru (SET9). When the definition is processed, the current value of the SET symbol replaces the Primitive.


Example:


Assume the following two SET assignments are in effect:

SET SET0 = "Hello"

SET SET1 = "Sailor!"


And you create a KB Definition of:

(Home)(EraseEOL)[(Set0) (Set1)](Enter)


The effective definition will be:

(Home)(EraseEOL)[Hello Sailor!](Enter)


This will Move the cursor to the Command Line, clear it, enter Hello Sailor! and press Enter. The result of course is an error message, but it does show how substitution works.


Warning: It is possible for one (SETn) variable to include another (SETn) variable. The value substitutions are performed left to right as each (SETn) variable is encountered. 


              If you enter a recursive value, SPFLite will enter a never-ending loop.