APPENDIX I

[continue/next section] [MAIN/Introduction] [table of contents]

CONTROL AND ESCAPE CODES

NOTE: Follow this link for a lynx-friendly version.


CONTROL CODES, ESCAPE CODES

I.1 CONTROL CODES

CHR$ Key Sequence Function

Effective in Mode:

C64 C128
CHR$(2) CTRL B Underline (80) *
CHR$(5) CTRL 2 or CTRL E Set character color to white (40) and (80) * *
CHR$(7) CTRL G Produce bell tone *
CHR$(8) CTRL H Disable character set change *
CHR$(9) CTRL I Enable character set change *
Move cursor to next tab position *
CHR$(10) CTRL J Send a carriage return with line feed *
Send a line feed *
CHR$(11) CTRL K Disable character set change *
CHR$(12) CTRL L Enable character set change *
CHR$(13) CTRL M Send a carriage return and line feed to the computer and enter a line of BASIC * *
CHR$(14) CTRL N Set character set to lower/upper case set * *
CHR$(15) CTRL O Turn flash on (80) *
CHR$(17) CRSR DOWN or CTRL Q Move the cursor down one row * *
CHR$(18) CTRL 9 characters to be printed in reverse field * *
CHR$(19) HOME or CTRL S Move the cursor to the home position (top left) of the display (the current window) * *
CHR$(20) DEL or CTRL T Delete last character typed and move all characters to the right one space to the left * *
CHR$(24) CTRL X Tab set/clear *
CHR$(27) ESC or CTRL [ Send an ESC character *
CHR$(28) CTRL 3 or CTRL / Send character color to red (40) and (80) * *
CHR$(29) CRSR RIGHT or CTRL ] Move cursor one column to the right * *
CHR$(30) CTRL 6 or CTRL ^ Set character color to green (40) and (80) * *
CHR$(34) " Print a double quote on screen and place editor in quote mode * *
CHR$(129) C= 1 Set character color to orange (40); dark purple (80) * *
CHR$(130) Underline off (80) *
CHR$(131) Run a program. This CHR$ code does not work in PRINT CHR$(131), but works from keyboard buffer *
CHR$(133) F1 Reserved CHR$ code for F1 key*
CHR$(134) F3 Reserved CHR$ code for F3 key*
CHR$(135) F5 Reserved CHR$ code for F5 key*
CHR$(136) F7 Reserved CHR$ code for F7 key*
CHR$(137) F2 Reserved CHR$ code for F2 key*
CHR$(138) F4 Reserved CHR$ code for F4 key*
CHR$(139) F6 Reserved CHR$ code for F6 key*
CHR$(140) F8 Reserved CHR$ code for F8 key*
CHR$(141) SHIFT RETURN Send a carriage return and line feed without entering a BASIC line * *
CHR$(142) Set the character set to upper case/graphics * *
CHR$(143) Turn flash off (80) *
CHR$(144) CTRL 1 Set character color to black (40) and (80) * *
CHR$(145) CRSR UP Move cursor or printing position up one row * *
CHR$(146) CTRL 0 Terminate reverse field display * *
CHR$(147) HOME Clear the window screen and move the cursor to the top left position * *
CHR$(148) INST Move character from cursor position right one column * *
CHR$(149) C= 2 Set character color to brown (40); dark yellow (80) * *
CHR$(150) C= 3 Set character color to light red (40) and (80) * *
CHR$(151) C= 4 Set character color to dark gray (40); dark cyan (80) * *
CHR$(152) C= 5 Set character color to medium gray (40) and (80) * *
CHR$(153) C= 6 Set character color to light green (40) and (80) * *
CHR$(154) C= 7 Set character color to light blue (40) and (80) * *
CHR$(155) C= 8 Set character color to light gray (40) and (80) * *
CHR$(156) CTRL 5 Set character color to purple (40) and (80) * *
CHR$(157) CRSR LEFT Move cursor left one column * *
CHR$(158) CTRL 8 Set character color to yellow (40) and (80) * *
CHR$(159) CTRL 4 Set character color to cyan (40); light cyan (80) * *

Note:
(40) ... 40 column screen only
(80) ... 80 column screen only

I.2 ESCAPE CODES

Following are key sequences for the ESCape functions available on the Commodore 128. ESCape sequences are entered by pressing and releasing the {ESC} key, following by pressing the key listed below.
ESCAPE FUNCTION ESCAPE KEY
Cancel quote and insert mode
ESC O
 
Erase to end of current line
ESC Q
Erase to start of current line
ESC P
Erase to end of screen
ESC @
 
Move to start of current line
ESC J
Move to end of current line
ESC K
 
Enable auto-insert mode
ESC A
Disable auto-insert mode
ESC C
 
Delete current line
ESC D
Insert line
ESC I
 
Set default tab stops (8 spaces)
ESC Y
Clear all tab stops
ESC Z
 
Enable scrolling
ESC L
Disable scrolling
ESC M
 
Scroll up
ESC V
Scroll down
ESC W
 
Enable bell (by CTRL G)
ESC G
Disable bell
ESC H
 
Set cursor to non-flashing mode
ESC E
Set cursor to flashing mode
ESC F
 
Set bottom of screen window at cursor position
ESC B
Set top of screen window at cursor position
ESC T
 
Swap 40/80 column display output device
ESC X
 

The following ESCape sequences are valid on an 80-column screen only. (See Section 8 for information on using an 80-column screen.)

 
Change to underlined cursor
ESC U
Change to block cursor
ESC S
 
Set screen to reverse video
ESC R
Set screen to normal (non reverse video) state
ESC N

[top of document]

page URL: www.bigfoot.com/~c128page/c128sg/app-i.htm
contact: c128page@bigfoot.com