keyw

Purpose

Waits for and gets a key.

Format

k = keyw()
Returns:

k (scalar) – ASCII value of the key pressed.

Remarks

If you are working in terminal mode, GAUSS will not see any input until you press the ENTER key. keyw() gets the next key from the keyboard buffer. If the keyboard buffer is empty, keyw() waits for a keystroke. For normal keys, keyw() returns the ASCII value of the key.

Here are the values returned if the key pressed is not a standard ASCII character in the range of 1-255:

Value

Key Sequence

1015

Shift+Tab

1016-1025

Alt+Q, W, E, R, T, Y, U, I, O, P

1030-1038

Alt+A, S, D, F, G, H, J, K, L

1044-1050

Alt+Z, X, C, V, B, N, M

1059-1068

F1-F10

1071

HOME

1072

CURSOR UP

1073

PAGE UP

1075

CURSOR LEFT

1077

CURSOR RIGHT

1079

END

1080

CURSOR DOWN

1081

PAGE DOWN

1082

INSERT

1083

DELETE

1084-1093

Shift+F1-F10

1094-1103

Ctrl+F1-F10

1104-1113

Alt+F1-F10

1114

Ctrl+PRINT SCREEN

1115

Ctrl+CURSOR LEFT

1116

Ctrl+CURSOR RIGHT

1117

Ctrl+END

1118

Ctrl+PAGE DOWN

1119

Ctrl+HOME

1120-1131

Alt+1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =

1132

Ctrl+PAGE UP

See also

Functions key(), vals(), chrs(), upper(), lower(), con(), cons()