Exemplo n.º 1
0
        public override void KeyUp(NSEvent theEvent)
        {
            Keys kk = KeyUtil.GetKeys(theEvent);

            _keys.Remove(kk);

            UpdateKeyboardState();
        }
Exemplo n.º 2
0
        public override void KeyDown(NSEvent theEvent)
        {
            Keys kk = KeyUtil.GetKeys(theEvent);

            if (!_keys.Contains(kk))
            {
                _keys.Add(kk);
            }

            UpdateKeyboardState();
        }
Exemplo n.º 3
0
        public override void KeyDown(NSEvent theEvent)
        {
            if (!string.IsNullOrEmpty(theEvent.Characters) && theEvent.Characters.All(c => char.GetUnicodeCategory(c) != UnicodeCategory.PrivateUse))
            {
                foreach (char c in theEvent.Characters)
                {
                    OnTextInput(new TextInputEventArgs(c));
                }
            }

            Keys kk = KeyUtil.GetKeys(theEvent);

            if (!_keys.Contains(kk))
            {
                _keys.Add(kk);
            }

            UpdateKeyboardState();
        }