<doc>
  <legacy_id>1386</legacy_id>
  <name>optionKeyDown</name>
  <type>message</type>
  <syntax>
    <example>optionKeyDown <i>keyName</i></example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
  </classification>
  <references>
    <function tag="altKey">altKey Function</function>
    <message tag="commandKeyDown">commandKeyDown Message</message>
    <message tag="controlKeyDown">controlKeyDown Message</message>
    <message tag="keyDown">keyDown Message</message>
    <function tag="optionKey">optionKey Function</function>
    <message tag="rawKeyDown">rawKeyDown Message</message>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
  </classes>
  <security>
  </security>
  <summary>Sent when the user presses an <glossary tag="Option key">Option key</glossary>, <glossary tag="Meta key">Meta key</glossary>, or <glossary tag="Alt key">Alt</glossary> <glossary tag="key combination">key combination</glossary>.</summary>
  <examples>
    <example>on optionKeyDown theKey <code><i>-- strip high bit</i></code></p><p>  answer numToChar(charToNum(theKey) - 128)</p><p>end optionKeyDown</example>
  </examples>
  <description>
    <p>Handle the <b>optionKeyDown</b> <keyword tag="message box">message</keyword> if you want to provide <glossary tag="Option key">Option key</glossary> shortcuts, or do something special when the user types an <glossary tag="Option key">Option key</glossary> combination.</p><p/><p><b>Parameters:</b></p><p>The <i>keyName</i> is the actual <keyword tag="character">character</keyword> typed.</p><p/><p><b>Comments:</b></p><p>The <b>optionKeyDown</b> <keyword tag="message box">message</keyword> is sent only when the user types a <glossary tag="key combination">key combination</glossary> that produces a <keyword tag="character">character</keyword>. For example, typing Option-F11 does not send an <b>optionKeyDown</b> <keyword tag="message box">message</keyword>, because Option-F11 does not produce a <keyword tag="character">character</keyword>.</p><p/><p>On MacOS 9, some key codes are not sent if the preceding character is one that produces an international diacritical. In those cases, the key code is held until the second character is typed, which then produces a character with an umlaut or other diacritical. So there is no way to trap these option keys until the user types the second character.</p><p/><p>The message is sent to the active (focused) control, or to the current card if no control is focused.</p><p/><p>The terminology varies depending on platform. The <b>optionKeyDown</b> <keyword tag="message box">message</keyword> is sent when the user types a <keyword tag="character">character</keyword> while holding down the <glossary tag="Option key">Option key</glossary> (<glossary tag="Mac OS">Mac OS systems</glossary>), <glossary tag="Meta key">Meta key</glossary> (<glossary tag="Unix">Unix systems</glossary>), or <glossary tag="Alt key">Alt key</glossary> (<glossary tag="Windows">Windows systems</glossary>).</p>
  </description>
</doc>