Exemplo n.º 1
0
        protected override void OnKeyUp(KeyEventArgs e)
        {
            if (MainWindow.keyButtonMap.Keys.Contains(e.Key))
            {
                TypingButton b = MainWindow.keyButtonMap[e.Key];
                b.IsActivated = false;
            }

            String strTarget = Text.Substring(m_currentPos, 1);

            if (e.Key == Key.Space)
            {
                ProcessInputText(" ");
            }
            base.OnKeyUp(e);
        }
Exemplo n.º 2
0
        protected override void  OnKeyDown(KeyEventArgs e)
        {
            if (MainWindow.keyButtonMap.Keys.Contains(e.Key))
            {
                TypingButton b = MainWindow.keyButtonMap[e.Key];

                if (m_lastButton != null)
                {
                    m_lastButton.IsError = false;
                }

                m_lastButton  = b;
                b.IsActivated = true;
            }

            base.OnKeyDown(e);
        }