<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<!--This is an automatically generated file. DO NOT EDIT THIS FILE DIRECTLY. Rather, use the _ref.xml files found in the 'edits' folder.-->
<c74object name="numkey" module="max" category="Interaction">
	<digest>
		Interpret numbers typed on the keyboard
	</digest>
	<description>
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Interaction
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				ASCII Key Codes From key
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				ASCII Key Codes From key
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Value of Number Typed When Entered
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				Value of Number While It's Being Typed
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="format" optional="1" type="float">
			<digest>
				Output format
			</digest>
			<description>
				A float argument causes <o>numkey</o> 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 <o>numkey</o>. The initial value is always 0.)
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Output the currently stored value
			</digest>
			<description>
				Sends the number currently stored in <o>numkey</o> out the left outlet, and resets the stored number to <m>0</m>.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="ASCII" optional="0" type="int" />
			</arglist>
			<digest>
				Input an ASCII value
			</digest>
			<description>
				The number is an ASCII value received from a <o>key</o> or <o>keyup</o> object. When digits are typed on the computer keyboard, <o>numkey</o> recognizes the ASCII values and interprets them as the numbers being typed.
				<br />
				<br />
				The keys recognized by <o>numkey</o> 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 <o>numkey</o>.
			</description>
		</method>
		<method name="clear">
			<arglist />
			<digest>
				Reset the stored number to 0
			</digest>
			<description>
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="numkey.png" caption="Recognizes all numbers typed in" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="key" />
		<seealso name="keyup" />
		<seealso name="number" />
		<seealso name="basicchapter08" module="max" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="int">
			<description>
				When digits are typed on the computer keyboard, and the ASCII value (from <o>key</o> or <o>keyup</o>) is received in the inlet, the digits are combined as a single number and stored in <o>numkey</o>. 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 <o>numkey</o> 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 <o>numkey</o> to <m>0</m>, so that a new number can be typed in.
			</description>
		</entry>
		<entry name="float">
			<description>
				When there is a float argument, <o>numkey</o> understands decimal points and fractional parts of a number, and sends out floats instead of ints.
			</description>
		</entry>
	</misc>
</c74object>
