numkey
Examples

Arguments
Attributes
Common Box Attributes
Messages
bang
int
Arguments
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
Output
float
When there is a float argument, numkey understands decimal points and fractional parts of a number, and sends out floats instead of ints.
int
When digits are typed on the computer keyboard, and the ASCII value (from key or keyup) is received in the inlet, the digits are combined as a single number and stored in numkey. The stored number is sent out the right outlet each time a new digit is typed. The Delete key on Macintosh or Backspace key on Windows erases the most recently typed digit, and sends the stored number out the right outlet. The period key acts as a decimal point and causes numkey not to store subsequent digits until a new number is started (unless there is a float argument). Typing the Return or Enter keys on Macintosh or the Enter key on Windows sends the stored number out the left outlet and resets the number stored in numkey to , so that a new number can be typed in.
See Also
Name | Description |
---|---|
key | |
keyup | |
number | |
Max Basic Tutorial 8: Keyboard and Mouse Input | Max Basic Tutorial 8: Keyboard and Mouse Input |