![]() |
![]() |
New Key Code Values |
![]() |
![]() |
The Spectrum regularly monitors the keyboard and generates a unique code to describe the key currently being pressed. Multiple key presses yield key codes that in a standard Spectrum have no meaning and hence are filtered out and ignored. For valid key presses the generated key code is stored in a System Variable named LAST_K at memory location 5C08h. The range of key codes supported has been extended within the Spectrum 128 due to the new editing functions provided by the keypad. The standard editing functions available via the keypad yield the same key codes as those from the keyboard but the new editing functions yield completely new values. These new key codes are listed below:
SYMBOL | KEY CODE | EDITING FUNCTION | ||
---|---|---|---|---|
![]() |
07h | Invoke the Options Menu (same as standard EDIT key code) | ||
![]() |
0Ch | Delete character to the left (same as standard DELETE key code) | ||
![]() |
AAh | Delete character to the right | ||
![]() |
A9h | Toggle between upper and lower screens | ||
![]() |
AFh | Move cursor to the beginning of the current word | ||
![]() |
AEh | Move cursor to the end of the current word | ||
![]() |
A8h | Move cursor to the beginning of the current line | ||
![]() |
A7h | Move cursor to the end of the current line | ||
![]() |
ADh | Move cursor up ten program lines | ||
![]() |
ACh | Move cursor down ten program lines | ||
![]() |
A6h | Move cursor to the first program line | ||
![]() |
A5h | Move cursor to the last program line | ||
![]() |
B1h | Delete to the beginning of the current line | ||
![]() |
B0h | Delete to the end of the current line | ||
![]() |
B4h | Delete to the beginning of the current word | ||
![]() |
B3h | Delete to the end of the current word |
Note that whilst SHIFT TOGGLE has no function it does cause a LAST_K value of B2h to be returned. This is then simply ignored. Use the Spectrum 128 style menu below to nagivate to other related sections.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |