public override void KeyUp(NSEvent theEvent) { Keys kk = KeyUtil.GetKeys(theEvent); _keys.Remove(kk); UpdateKeyboardState(); }
public override void KeyDown(NSEvent theEvent) { Keys kk = KeyUtil.GetKeys(theEvent); if (!_keys.Contains(kk)) { _keys.Add(kk); } UpdateKeyboardState(); }
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(); }