Esempio n. 1
0
 /// <summary>
 /// Gets the X11 scan code for the passed in X11 key symbol, or -1 if we don't know
 /// the scan code.
 /// </summary>
 internal static int GetScanCode(int keySym)
 {
     if (Instance == null)
     {
         Instance = new X11KeyConverter();
     }
     return(Instance.Convert(keySym));
 }
Esempio n. 2
0
        private bool PassKeyEventToIbus(Control control, int keySym, Keys modifierKeys)
        {
            if (!IBusCommunicator.Connected)
            {
                return(false);
            }

            int scancode = X11KeyConverter.GetScanCode(keySym);

            if (scancode > -1)
            {
                if (IBusCommunicator.ProcessKeyEvent(keySym, scancode, modifierKeys))
                {
                    return(true);
                }
            }

            // If ProcessKeyEvent doesn't consume the key, we need to kill any preedits and
            // sync before continuing processing the keypress. We return false so that the
            // control can process the character.
            ResetAndWaitForCommit(control);
            return(false);
        }
Esempio n. 3
0
		/// <summary>
		/// Gets the X11 scan code for the passed in X11 key symbol, or -1 if we don't know
		/// the scan code.
		/// </summary>
		internal static int GetScanCode(int keySym)
		{
			if (Instance == null)
				Instance = new X11KeyConverter();
			return Instance.Convert(keySym);
		}
Esempio n. 4
0
        private bool PassKeyEventToIbus(Control control, Keys keyChar, Keys modifierKeys)
        {
            var keySym = X11KeyConverter.GetKeySym(keyChar);

            return(PassKeyEventToIbus(control, keySym, modifierKeys));
        }