<?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="modifiers" module="max" category="Interaction">
	<digest>
		Report modifier key presses
	</digest>
	<description>
		Polls and reports the state of the keyboard's modifier keys.
	</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>
				bang Triggers Modifier Info
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				bang Triggers Modifier Info
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				1 if Shift Key Down, 0 if Up
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				1 if Caps Lock Down, 0 if Up
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="2" type="OUTLET_TYPE">
			<digest>
				1 if Option/Alt Key Down, 0 if Up
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="3" type="OUTLET_TYPE">
			<digest>
				1 if Ctrl Key Down, 0 if Up
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="4" type="OUTLET_TYPE">
			<digest>
				1 if Command/Fn Key Down, 0 if Up
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="rate" optional="1" units="ms" type="int">
			<digest>
				Polling rate
			</digest>
			<description>
				Specifies a polling rate in milliseconds. The default value is <m>0</m> (no polling).
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Output modifier key states
			</digest>
			<description>
				Sends out a report of the current modifier key states.
			</description>
		</method>
		<method name="(keyboard)">
			<arglist />
			<digest>
				Update modifier values
			</digest>
			<description>
				The keyboard input to <o>modifiers</o> comes directly from the computer keyboard.
			</description>
			<attributelist>
				<attribute name="documentable" get="1" set="1" type="int" size="1" value="1" />
			</attributelist>
		</method>
		<method name="interval">
			<arglist>
				<arg name="rate" optional="0" type="int" />
			</arglist>
			<digest>
				Set the polling rate
			</digest>
			<description>
				The word <m>interval</m> followed by a number, specifies the rate, in milliseconds, used when polling the state of the modifier keys. A value of zero disables polling.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="modifiers.png" caption="Modifier keys typed on the computer keyboard can be used to trigger messages" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="key" />
		<seealso name="keyup" />
		<seealso name="modifiers" />
		<seealso name="numkey" />
		<seealso name="basicchapter08" module="max" type="tutorial" />
	</seealsolist>
	<misc name="Output">
		<entry name="int">
			<description>
				Output is sent whenever a modifier key is pressed down on the computer keyboard. Modifier key states are reported as <m>0</m> (not pressed) or <m>1</m> (pressed).
				<br />
				<br />
				Out left outlet: The on/off state of the Shift key.
				<br />
				<br />
				Out second outlet: The on/off state of the Caps Lock key.
				<br />
				<br />
				Out third outlet: the on/off state of the Option key on Macintosh or the Alt key on Windows.
				<br />
				<br />
				Out fourth outlet: the on/off state of the Control key.
				<br />
				<br />
				Out fifth outlet: the on/off state of the Command key on Macintosh or the Control key on Windows.
				<br />
				<br />
				Note: The fourth and fifth outlets both report the on/off state of the Control key on Windows, since the Command key on Macintosh is equivalent to the Control key on Windows. For cross-platform uses, Windows users should use the fifth outlet of the <o>modifiers</o> object for reporting the Control key state. The fourth outlet also reports the Control key on Windows so that (older) Macintosh patches that use this key can be opened on Windows systems. The Macintosh Control key normally corresponds to the right-hand mouse button on Windows. See the section on file and key mappings in the Max Tutorials for a complete discussion of cross-platform keyboard issues.
			</description>
		</entry>
	</misc>
</c74object>
