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

            _keys.Remove(kk);

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

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

            UpdateKeyboardState();
        }
Ejemplo 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();
        }