Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

You can donate to the Synchronet project using PayPal.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
custom:ctrl-a_codes [2019/01/11 03:38] – [Control] Document the new Ctrl-AZ vs. Ctrl-Az behavior in v3.17c. digital mancustom:ctrl-a_codes [2024/05/25 16:00] (current) – [Attributes] Document new rainbow attribute code (Ctrl-AX) digital man
Line 1: Line 1:
-====== Ctrl-A (Attribute) Codes ====== +====== Attribute (Ctrl-A) Codes ====== 
-"Control A" codes (a.k.a. ^A codes) are terminal control sequences embedded in Synchronet text and menu display files.+//Attribute Codes// (a.k.a. ^A codes) are terminal control sequences embedded in Synchronet text and menu display files.
  
 ===== Background ===== ===== Background =====
Line 12: Line 12:
  
 ===== Use ===== ===== Use =====
-Ctrl-A codes are 2-character sequences which begin with a Ctrl-A (ASCII 1) character (hence the name) and are followed by a single character (case insensitive) which determines the operation to be performed. The only exception to this 2-character sequence is the Ctrl-A''"//filename//'' code, which takes a filename as an argument and the filename is considered part of the sequence and not displayed.+Ctrl-A codes are 2-character sequences that begin with a Ctrl-A (ASCII 1) character (hence the name) followed by a single character (the operand) which determines the operation to be performed. The only exception to this 2-character sequence is the Ctrl-A''"//filename//'' code, which takes a filename as an argument and the filename is considered part of the sequence and not displayed.
  
-It can sometimes require a special purpose text editor to actually enter a Ctrl-A character into a text file. Some editors may require a special key sequence or use of a menu option to enter Ctrl-A character into a file. The graphical representation of the character may be a happy face or any other non-alphanumeric symbol that the editor chooses to render to represent that character code. There are [[atcodes|@-Codes]] for the equivalent of many of the Ctrl-A codes, so may consider using them if they are more convenient for your text editor of choice.+It can sometimes require a special purpose text editor to actually enter a Ctrl-A character into a text file. Some editors may require a special key sequence or use of a menu option to enter an actual Ctrl-A character into a file. The graphical representation of the character may be a happy face (☺) or any other non-alphanumeric symbol that the editor chooses to render to represent that character code. There are [[atcodes|@-Codes]] for the equivalent of most Ctrl-A codes, so consider using them if they are more convenient for your text editor of choice.
  
-In the ''[[custom:text.dat]]'' and possibly some other files (e.g. [[JavaScript]] and [[:util:Baja]] source files), Ctrl-A characters may be included by using the escape sequence ''\1'' rather than having to insert an actual control character into the file.+In the ''[[custom:text.dat]]'' and possibly some other files (e.g. [[JavaScript]] and [[:util:Baja]] source files), Ctrl-A characters may be included by using the escape sequence ''\1'' (or ''\x01''rather than having to insert the actual control character into the file.
  
 The [[util:ANS2ASC]] utility may be used to convert files encoded with ANSI X3.64 terminal escape sequences (e.g. ''*.ans'') into Ctrl-A encoded output and the [[util:ASC2ANS]] utility can be used to perform the opposite operation (useful for editing Ctrl-A encoded files (e.g. ''*.msg'' or ''*.asc'') with an //[[resource:ansi editors|ANSI-BBS screen editor]]//). The [[util:ANS2ASC]] utility may be used to convert files encoded with ANSI X3.64 terminal escape sequences (e.g. ''*.ans'') into Ctrl-A encoded output and the [[util:ASC2ANS]] utility can be used to perform the opposite operation (useful for editing Ctrl-A encoded files (e.g. ''*.msg'' or ''*.asc'') with an //[[resource:ansi editors|ANSI-BBS screen editor]]//).
Line 38: Line 38:
 The following table is a list of //Attribute Control// Ctrl-A codes, and a brief description of each code's usage: The following table is a list of //Attribute Control// Ctrl-A codes, and a brief description of each code's usage:
  
-^Attribute ^ Code    ^Description                    ^ +^Attribute          ^ Code    ^Description                    ^ 
-|High             |  ''H''  |High Intensity (bright) foreground | +|Bright             | ''H'' |High Intensity foreground | 
-|Blink             ''I''  |Blinking (slow) or high intensity (bright) background (so-called iCE colors) when supported | +|Blink              | ''I'' |Blinking (slow), when supported by the terminal | 
-|Blink-Font        ''f''  |Set the //Blink// attribute **only** if a alternate [[config:fonts.ini|Blink-font]] has been activated in the terminal (new in v3.17) | +|Bright-Background  | ''E'' |High intensity background (so-called iCE colors)when supported by the terminal (new in v3.17c) 
-|High-Blink-Font   ''F''  |Set the //Blink// attribute **only** if a alternate [[config:fonts.ini|High-intensity Blink-font]] has been activated in the terminal (new in v3.17) | +|Blink-Font         | ''f'' |Set the //Blink// attribute **only** if a alternate [[config:fonts.ini|Blink-font]] has been activated in the terminal (new in v3.17) | 
-|Normal            ''N''  |No Special Attributes (Normal, e.g. light-gray) | +|High-Blink-Font    | ''F'' |Set the //Blink// attribute **only** if a alternate [[config:fonts.ini|High-intensity Blink-font]] has been activated in the terminal (new in v3.17) | 
-|Optimized Normal |  ''-''  |Only changes to //normal// if High Intensity, Blinking, or Background attribute is set (or pop attributes if pushed)| +|Normal             | ''N'' |No Special Attributes (Normal, e.g. light-gray) - resets both //High// and //Blink// attributes 
-|Optimized Normal |  ''_''  |Only changes to //normal// if the Blinking or Background attribute is set |+|Optimized Normal   | ''-'' |Only changes to //normal// if High Intensity, Blinking, or Background attribute is set (or pop attributes if pushed)| 
 +|Optimized Normal   | ''_'' |Only changes to //normal// if the Blinking or Background attribute is set 
 +|Rainbow, wrapped   | ''X'' |Alternating attributes, wrapping the pattern for longer strings | 
 +|Rainbow            | ''x'' |Alternating attributes, repeating the last attribute for longer strings |
  
 +==== Rainbows ====
 +The rainbow attribute (Ctrl-AX or Ctrl-Ax code) enables an alternating attribute pattern that is configurable by the sysop in their ''[[dir:ctrl]]/[[config:attr.ini]]'' file or by using the ''RAINBOW'' [[custom:atcodes|@-code]].
 +  * If you wish to start with an attribute offset from the beginning of the configured rainbow attribute pattern (i.e. don't start with the first attribute of the pattern), include multiple consecutive Ctrl-AX or Ctrl-Ax codes before the first text character that's to be colorized.
 +  * If you wish for the last rainbow attribute to be repeated (rather than wrapping back to the first attribute) when the end of the attribute pattern is reached, use Ctrl-Ax (lowercase ''x'') instead of Ctrl-AX
 +==== High Intensity and Blink ====
 +The //High Intensity// console attribute behaves as it does with ANSI terminals: that is, once enabled, the current color and any subsequent new colors will be rendered in their "high intensity" (bright) version. To revert to normal/dark colors, a //Normal// (or //Optimized Normal//) Ctrl-A code must be specified. The //Normal// attribute code will reset both the //High Intensity// and the current color - back to the default, "light gray".
 +
 +The //Blink// console attribute behaves similarly: once set, all newly-printed characters will have the blink attribute until a //Normal// attribute code is encountered.
 ===== Control ===== ===== Control =====
  
Line 57: Line 68:
 |Delay          |  '';''   |Delay for one half second| |Delay          |  '';''   |Delay for one half second|
 |Delay          |  ''.''   |Delay for two seconds| |Delay          |  ''.''   |Delay for two seconds|
-|Cls            |  ''L''   |Clear the screen and home the cursor| +|Cls            |  ''L''   |Clear the screen, clear any existing mouse hot-spots, and home the cursor | 
-|Home            ''`''   |Home the cursor (without necessarily clearing the screen)|+|Home            '''''   |Home the cursor (without necessarily clearing the screen, used to be ''`'')| 
 +|Hungry-hotspot |  ''~''   |Precedes a single-character hungry mouse hot-spot command (CR if next character is a ctrl char or end of string) | 
 +|Strict-hotspot |  ''`''   |Precedes a single-character strict mouse hot-spot command (or "Home" if next character is a ctrl char or end of string) |
 |Clreos          ''J''   |Clear to end of screen (leave cursor in current position)| |Clreos          ''J''   |Clear to end of screen (leave cursor in current position)|
 |Clreol          ''>''   |Clear to end of line (leave cursor in current position)| |Clreol          ''>''   |Clear to end of line (leave cursor in current position)|
Line 65: Line 78:
 |LF              '']''   |Send a line feed character (Ctrl-J) - Cursor Down| |LF              '']''   |Send a line feed character (Ctrl-J) - Cursor Down|
 |Cond-Newline    ''/''   |Send a new-line sequence (CRLF) **only** when the cursor is not already in the first column (new in v3.17) | |Cond-Newline    ''/''   |Send a new-line sequence (CRLF) **only** when the cursor is not already in the first column (new in v3.17) |
 +|Cond-Linecont  |  ''\''   |Send a line-continuation sequence (''[[custom:text.dat]]'' //LongLineContinuationPrefix// line) if terminal < 80 columns |
 |Cond-Blankline |  ''?''   |Send a blank-line sequence **only** when the previously printed line was not blank (new in v3.17) | |Cond-Blankline |  ''?''   |Send a blank-line sequence **only** when the previously printed line was not blank (new in v3.17) |
 |Push Attr      |  ''+''   |Save current attributes into (server-side) attribute LIFO stack| |Push Attr      |  ''+''   |Save current attributes into (server-side) attribute LIFO stack|