Example #1
0
        private void OnKeyUp(object sender, KeyEventArgs e)
        {
            e.Handled = true;

            this.currentPressedKeys.Remove(e.Key);
            this.keyboard.TriggerKeyUp(AvaloniaHelpers.ConvertFromAvaloniaKey(e.Key));
        }
Example #2
0
        private void OnKeyDown(object sender, KeyEventArgs e)
        {
            e.Handled = true;
            if (this.currentPressedKeys.Contains(e.Key))
            {
                return;
            }

            this.currentPressedKeys.Remove(e.Key);

            this.keyboard.TriggerKeyDown(AvaloniaHelpers.ConvertFromAvaloniaKey(e.Key));
        }