Пример #1
0
        private void keyboardListener_KeyUp(object sender, RawKeyEventArgs e)
        {
            var kb = _lastBindings.FirstOrDefault(k => k.Gesture.SetEquals(_lastKeys));
            if (kb != default(KeyBinding))
            {
                kb.Command.OnKeyUp();
                _lastBindings.Remove(kb);
            }

            _lastKeys.Remove(TranslateKey(e.Key));
        }
Пример #2
0
        private void keyboardListener_KeyUp(object sender, RawKeyEventArgs e)
        {
            var kb = _lastBindings.FirstOrDefault(k => k.Gesture.SetEquals(_lastKeys));

            if (kb != default(KeyBinding))
            {
                kb.Command.OnKeyUp();
                _lastBindings.Remove(kb);
            }

            _lastKeys.Remove(TranslateKey(e.Key));
        }
Пример #3
0
        private void keyboardListener_KeyDown(object sender, RawKeyEventArgs e)
        {
            _lastKeys.Add(TranslateKey(e.Key));

            var kb = KeyBindings.FirstOrDefault(k => k.Gesture.SetEquals(_lastKeys));

            if (kb != default(KeyBinding))
            {
                _lastBindings.Add(kb);
                kb.Command.OnKeyDown();
            }
        }
Пример #4
0
        private void keyboardListener_KeyDown(object sender, RawKeyEventArgs e)
        {
            _lastKeys.Add(TranslateKey(e.Key));

            var kb = KeyBindings.FirstOrDefault(k => k.Gesture.SetEquals(_lastKeys));
            if (kb != default(KeyBinding))
            {
                _lastBindings.Add(kb);
                kb.Command.OnKeyDown();
            }
        }