<doc>
	<legacy_id>2076</legacy_id>
	<name>type</name>
	<type>command</type>

	<syntax>
		<example>type <i>string</i> [with <i>key</i> [,<i>key</i> [,<i>key</i> ]]]</example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary>Simulates typing on the keyboard.</summary>

	<examples>
<example>type "ABC"</example>
<example>type field "output"</example>
<example><p>type allKeyboardKeys with shiftKey,optionKey</p></example>
	</examples>

	<history>
		<introduced version="1.0">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		
		<experimental version=""></experimental>
		<nonexperimental version=""></nonexperimental>
	</history>

	<objects>
	</objects>

	<platforms>
		<mac/>
		<windows/>
		<linux/>
		<ios/>
		<android/>
	</platforms>

	<classes>
		<desktop/>
		<server/>
		<web/>
		<mobile/>
	</classes>

	<security>
	</security>


	<classification>
		<category>User Interaction</category>
	</classification>

	<references>
		<command tag="click">click Command</command>
		<property tag="blindTyping">blindTyping Property</property>
		<property tag="typingRate">typingRate Property</property>
	</references>

	<description>Use the <b>type</b> command to show text appearing in a <keyword tag="field">field</keyword> at typing pace or to send keyboard <glossary tag="event">events</glossary> to a <object tag="stack">stack</object>.<p></p><p><b>Parameters:</b></p><p>The <i>string</i> is any <glossary tag="expression">expression</glossary> that <glossary tag="evaluate">evaluates</glossary> to a <keyword tag="string">string</keyword>.</p><p></p><p>The <i>key</i> is one of commandKey, controlKey, optionKey, or shiftKey. You can specify up to three keys, separated by commas. (On Windows and <glossary tag="Unix">Unix systems</glossary>, commandKey indicates the Control key.)</p><p></p><p><b>Comments:</b></p><p>The <b>type</b> <glossary tag="command">command</glossary> sends a <message tag="rawKeyDown">rawKeyDown</message> and <message tag="rawKeyUp">rawKeyUp</message> message to the <glossary tag="current card">current card</glossary> for each <keyword tag="character">character</keyword> typed.</p><p></p><p>The type command does not automatically place an insertion point in a field, so if you want to simulate typing into a field, you must first use the select command to place the insertion point:</p><p></p><p>  select after field "Data"</p><p>  type "Hello"</p><p></p><p>The speed at which characters are typed is controlled by the <b>typingRate</b> <glossary tag="property">property</glossary>. To quickly put text into a <keyword tag="field">field</keyword> without delay, use the <command tag="put">put</command> <glossary tag="command">command</glossary> instead.</p><p></p><p></p><note>To type text into a <keyword tag="field">field</keyword>, you must first place the <glossary tag="insertion point">insertion point</glossary> in the <keyword tag="field">field</keyword> using the <command tag="select">select</command> or <command tag="click">click</command> <glossary tag="command">command</glossary>.</note><p></p><p></p><note>As the <b>type</b> command is designed to emulate exactly what happens when a user types a key on the keyboard, the <message tag="rawKeyDown">rawKeyDown</message>, <message tag="keyDown">keyDown</message>, <message tag="rawKeyUp">rawKeyUp</message> and <message tag="keyUp">keyUp</message> messages are sent by the command. If these messages are blocked, the text will not appear in the selected field.</note></description>
</doc>