The Prizm’s syscalls and related keyboard functions use different methods of representing keys. These values vary in size and are tied to specific groups of syscalls. The Reading_Input tutorial page has information on such syscalls and their uses.
Matrix Key Codes #
The matrix key codes are a 2 byte column/row pair specified as 0xCCRR. These correlate to the column and row of the keyboard matrix that the key is located at. The following functions use this key format:
- GetKeyWait_OS
- Keyboard_PutKeycode (first two parameters)
The two tables in this section show the same information, presented in different ways.
Matrix Hexadecimal Codes | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
F1 070A |
F2 060A |
F3 050A |
F4 040A |
F5 030A |
F6 020A | |||||||||
Shift 0709 |
Optn 0609 |
Vars 0509 |
Menu 0409 |
| ||||||||||
Alpha 0708 |
𝓍² 0608 |
^ 0508 |
Exit 0408 | |||||||||||
X,θ,T 0707 |
log 0607 |
ln 0507 |
sin 0407 |
cos 0307 |
tan 0207 | |||||||||
ab/c 0706 |
F↔D 0606 |
( 0506 |
) 0406 |
, 0306 |
→ 0206 |
7 0705 |
8 0605 |
9 0505 |
DEL 0405 |
AC/ON 0101 |
4 0704 |
5 0604 |
6 0504 |
× 0404 |
÷ 0304 |
1 0703 |
2 0603 |
3 0503 |
+ 0403 |
- 0303 |
0 0702 |
. 0602 |
EXP 0502 |
(‒) 0402 |
EXE 0302 |
Matrix Hexadecimal Codes | |||||||
---|---|---|---|---|---|---|---|
F1 | F2 | F3 | F4 | F5 | F6 | 0A | |
SHIFT | OPTN | VARS | MENU | ← | ↑ | 09 | |
ALPHA | x^2 | ^ | EXIT | ↓ | → | 08 | |
X,θ,T | log | ln | sin | cos | tan | 07 | |
a b/c | F↔D | ( | ) | , | → | 06 | |
7 | 8 | 9 | DEL | 05 | |||
4 | 5 | 6 | × | ÷ | 04 | ||
1 | 2 | 3 | + | - | 03 | ||
0 | . | EXP | (-) | EXE | 02 | ||
AC/On | 01 | ||||||
07 | 06 | 05 | 04 | 03 | 02 | 01 |
Program Key Codes #
The key codes here are decimal values made up of the column and row as CR. The following functions use this key format:
- PRGM_GetKey - Function to emulate legacy functionality, see PRGM_GetKey_OS for definition.
Program Codes | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
F1 79 |
F2 69 |
F3 59 |
F4 49 |
F5 39 |
F6 29 | |||||||||
Shift 78 |
Optn 68 |
Vars 58 |
Menu 48 |
| ||||||||||
Alpha 77 |
𝓍² 67 |
^ 57 |
Exit 47 | |||||||||||
X,θ,T 76 |
log 66 |
ln 56 |
sin 46 |
cos 36 |
tan 26 | |||||||||
ab/c 75 |
F↔D 65 |
( 55 |
) 45 |
, 35 |
→ 25 |
7 74 |
8 64 |
9 54 |
DEL 44 |
AC/ON 10 |
4 73 |
5 63 |
6 53 |
× 43 |
÷ 33 |
1 72 |
2 62 |
3 52 |
+ 42 |
- 32 |
0 71 |
. 61 |
EXP 51 |
(‒) 41 |
EXE 31 |
Character and Control Codes #
Character codes are not directly mapped to the physical keys on the keyboard. The values use the state of key modifiers to return a value pertaining to the specific function of a key (pressing EXIT returns a code that’s different from when pressing SHIFT then EXIT). The following syscalls use these codes:
- GetKey
- Keyboard_PutKeycode (third parameter)
- EditMBStringCtrl and variants
- EditMBStringChar and variants
The values in the tables below are in hexadecimal.
C&C Codes (no modifier) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
F1 7539 |
F2 753A |
F3 753B |
F4 753C |
F5 753D |
F6 753E | |||||||||
Shift 7536 |
Optn 7538 |
Vars 7540 |
Menu 7533 |
| ||||||||||
Alpha 7537 |
𝓍² 008B |
^ 00A8 |
Exit 7532 | |||||||||||
X,θ,T 7531 |
log 0095 |
ln 0085 |
sin 0081 |
cos 0082 |
tan 0083 | |||||||||
ab/c 00BB |
F↔D 755E |
( 0028 |
) 0029 |
, 002C |
→ 000E |
7 0037 |
8 0038 |
9 0039 |
DEL 7549 |
AC/ON 753F |
4 0034 |
5 0035 |
6 0036 |
× 00A9 |
÷ 00B9 |
1 0031 |
2 0032 |
3 0033 |
+ 0089 |
- 0099 |
0 0030 |
. 002E |
EXP 000F |
(‒) 0087 |
EXE 7534 |
C&C Codes (Shift) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
F1 7539 |
F2 753A |
F3 753B |
F4 753C |
F5 753D |
F6 753E | |||||||||
Shift 7536 |
Optn 756B |
Vars 754C |
Menu 7555 |
| ||||||||||
Alpha 7537 |
𝓍² 0086 |
^ 00B8 |
Exit 754D | |||||||||||
X,θ,T 7F54 |
log 00B5 |
ln 00A5 |
sin 0091 |
cos 0092 |
tan 0093 | |||||||||
ab/c 7566 |
F↔D 754A |
( 0096 |
) 009B |
, -- |
→ -- |
7 7567 |
8 7562 |
9 7554 |
DEL 7551 |
AC/ON -- |
4 7594 |
5 7595 |
6 -- |
× 007B |
÷ 007D |
1 7F51 |
2 7F40 |
3 -- |
+ 005B |
- 005D |
0 7F50 |
. 003D |
EXP 00D0 |
(‒) 00C0 |
EXE 000D |
C&C Codes (Alpha uppercase) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
F1 7539 |
F2 753A |
F3 753B |
F4 753C |
F5 753D |
F6 753E | |||||||||
Shift 7536 |
Optn 7538 |
Vars 7540 |
Menu 7533 |
| ||||||||||
Alpha 7537 |
𝓍² 00CD |
^ 00CE |
Exit 7532 | |||||||||||
X,θ,T 0041 |
log 0042 |
ln 0043 |
sin 0044 |
cos 0045 |
tan 0046 | |||||||||
ab/c 0047 |
F↔D 0048 |
( 0049 |
) 004A |
, 004B |
→ 004C |
7 004D |
8 004E |
9 004F |
DEL 755D |
AC/ON 753F |
4 0050 |
5 0051 |
6 0052 |
× 0053 |
÷ 0054 |
1 0055 |
2 0056 |
3 0057 |
+ 0058 |
- 0059 |
0 005A |
. 0020 |
EXP 0022 |
(‒) 7576 |
EXE 7534 |
C&C Codes (Alpha lowercase) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
F1 7539 |
F2 753A |
F3 753B |
F4 753C |
F5 753D |
F6 753E | |||||||||
Shift 7536 |
Optn 7538 |
Vars 7540 |
Menu 7533 |
| ||||||||||
Alpha 7537 |
𝓍² 00CD |
^ 00CE |
Exit 7532 | |||||||||||
X,θ,T 0061 |
log 0062 |
ln 0063 |
sin 0064 |
cos 0065 |
tan 0066 | |||||||||
ab/c 0067 |
F↔D 0068 |
( 0069 |
) 006A |
, 006B |
→ 006C |
7 006D |
8 006E |
9 006F |
DEL 755D |
AC/ON 753F |
4 0070 |
5 0071 |
6 0072 |
× 0073 |
÷ 0074 |
1 0075 |
2 0076 |
3 0077 |
+ 0078 |
- 0079 |
0 007A |
. 0020 |
EXP 0022 |
(‒) 7576 |
EXE 7534 |
Notes #
- The values of the characters in Alpha mode are the same as their ASCII codes, both for upper- and lower-case.
- Certain keys have a different value when modifiers are on, even when there is nothing printed on the keyboard to indicate such. Examples include Shift+Optn and Shift+cursor keys.
- Control codes start at 0x7530 (decimal: 30000) and are meant to be redirected to syscalls such as EditMBStringCtrl; character codes are much lower values and should be redirected to syscalls like EditMBStringChar.
Direct Keyboard Matrix #
TODO