protected virtual void SelectKeyboard(KeyboardDescription keyboard)
        {
            Debug.Assert(keyboard.Engine == this);
            Debug.Assert(keyboard is XkbKeyboardDescription);
            var xkbKeyboard = keyboard as XkbKeyboardDescription;

            if (xkbKeyboard == null)
            {
                throw new ArgumentException();
            }

            if (xkbKeyboard.GroupIndex >= 0)
            {
                _engine.SetGroup(xkbKeyboard.GroupIndex);
            }
        }
Esempio n. 2
0
        public bool ActivateKeyboard(IKeyboardDefinition keyboard)
        {
            Debug.Assert(keyboard is KeyboardDescription);
            Debug.Assert(((KeyboardDescription)keyboard).Engine == this);
            Debug.Assert(keyboard is XkbKeyboardDescription);
            var xkbKeyboard = keyboard as XkbKeyboardDescription;

            if (xkbKeyboard == null)
            {
                throw new ArgumentException();
            }

            if (xkbKeyboard.GroupIndex >= 0)
            {
                m_engine.SetGroup(xkbKeyboard.GroupIndex);
            }
            return(true);
        }