示例#1
0
        private void CheckKeyCodeEvent(KeyCodeEventData eventData)
        {
            bool    _modIsDown = false;
            KeyCode _validMod  = KeyCode.None;

            // Loop through all the aliases for
            KeyCodeAliasManager.PerformOnAliases(eventData.m_modifierKeyCode, (KeyCode alias) =>
            {
                _modIsDown = KeyCodeEventData.IsModDown(alias);
                _validMod  = alias;

                return(_modIsDown);
            }, true);

            if (_modIsDown == false)
            {
                return;
            }

            bool _primIsDown = false;

            KeyCodeAliasManager.PerformOnAliases(eventData.m_primaryKeyCode, (KeyCode alias) =>
            {
                _primIsDown = KeyCodeEventData.IsStateActive(_validMod, alias, eventData.m_keyState);

                return(_primIsDown);
            }, true);

            if (_primIsDown == false)
            {
                return;
            }

            eventData.ActivateEvents();
        }
示例#2
0
 public void AddMappedKey(KeyCodeEventData mappedKey)
 {
     m_mappedKeys.Add(mappedKey);
 }