Interpret numbers typed on the computer keyboard
Name | Type | Opt | Description |
---|---|---|---|
output-format | float | opt | A float argument causes numkey to understand the decimal point and the fractional part of a number, and send out floats instead of ints. (The argument does not, however, set an initial value for numkey. The initial value is always 0.) |
bang | Sends the number currently stored in numkey out the left outlet, and resets the stored number to . | |
int | ASCII-value [int] |
The number is an ASCII value received from a key or keyup object. When digits are typed on the computer keyboard, numkey recognizes the ASCII values and interprets them as the numbers being typed. The keys recognized by numkey are the digits 0-9, the Delete (Backspace) key, decimal point (period), Return, and Enter. Digits are combined as a single number and stored in numkey. |
clear | Resets the stored number to | .
Name | Description |
---|---|
key | Report key presses on the computer keyboard |
keyup | Report key releases on the computer keyboard |
number | Display and output a number |
Max Basic Tutorial 8: Keyboard and Mouse Input | Max Basic Tutorial 8: Keyboard and Mouse Input |