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