Esempio n. 1
0
 public static RawInputKeyResponse convert(RawKeyEvent evt)
 {
     return(new RawInputKeyResponse(
                false,
                evt.data.unityEvent.character,
                null));
 }
Esempio n. 2
0
        internal static RawInputKeyResponse _handleGlobalInputKey(int client, RawKeyEvent evt)
        {
            if (_currentConnection == null)
            {
                return(RawInputKeyResponse.convert(evt));
            }

            if (client != _currentConnection._id)
            {
                return(RawInputKeyResponse.convert(evt));
            }

            return(_currentConnection._client.globalInputKeyHandler(evt));
        }
Esempio n. 3
0
        internal void _handleKeyEvent(Event evt)
        {
            if (this._listeners.isEmpty())
            {
                return;
            }

            var keyboardEvent = RawKeyEvent.fromEvent(evt);

            if (keyboardEvent == null)
            {
                return;
            }

            foreach (var listener in new List <ValueChanged <RawKeyEvent> >(this._listeners))
            {
                if (this._listeners.Contains(listener))
                {
                    listener(keyboardEvent);
                }
            }
        }