Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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();
            }
        }
Exemplo n.º 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();
            }
        }