.. _KeyboardState: ================================================ KeyboardState ================================================ Description ----------- Reports the active state of the keyboard. Access through the?ScriptUI.environment.keyboardState?property. Query the properties of this object at any time to determine the current key that is down and any modifiers that are pressed. Properties ^^^^^^^^^^ +--------------------------------------------------+---------------------------------------------------------------------------------------------+ | :ref:`altKey` readonly | True if the Alt or Option key is pressed. | +--------------------------------------------------+---------------------------------------------------------------------------------------------+ | :ref:`ctrlKey` readonly | True if the Ctrl key is pressed. | +--------------------------------------------------+---------------------------------------------------------------------------------------------+ | :ref:`keyName` readonly | A string containing the name of the currently pressed key, such as "a", or an empty string. | +--------------------------------------------------+---------------------------------------------------------------------------------------------+ | :ref:`metaKey` readonly | True if the Cmd key (in Mac OS) or Windows key (in Windows) is pressed. | +--------------------------------------------------+---------------------------------------------------------------------------------------------+ | :ref:`shiftKey` readonly | True if the Shift key is pressed. | +--------------------------------------------------+---------------------------------------------------------------------------------------------+ .. container:: hide .. toctree:: :hidden: :maxdepth: 1 KeyboardState/keyName.rst KeyboardState/shiftKey.rst KeyboardState/ctrlKey.rst KeyboardState/altKey.rst KeyboardState/metaKey.rst