Ejemplo n.º 1
0
        public bool Income(int vkCode, bool gis, bool shf, KeyboardLayout kl)
        {
            Key k = new Key();

            k.alt    = gis;
            k.shift  = shf;
            k.vkCode = vkCode;
            if (k.vkCode == 8)
            {
                k.ch = "delete";
            }
            else
            {
                if (mfm != null)
                {
                    if (mfm.dkstate != "none")
                    {
                        k    = kl.ProcessKey(k, mfm.dkstate);
                        k.ch = k.ch.Replace("◌", "");
                    }
                    else
                    {
                        k    = kl.ProcessKey(k);
                        k.ch = k.ch.Replace("◌", "");
                    }
                }
            }
            if (k.ch.StartsWith("[") && k.ch.EndsWith("]"))
            {
                if (mfm != null)
                {
                    mfm.dkChange(k.ch.Replace("[", "").Replace("]", ""));
                    return(true);
                }
            }
            else
            {
                mfm.dkChange("none");
            }
            bool eat = false;

            foreach (string s in CompatibilityDecompose(k.ch))
            {
                eat = eat | Income(s);
            }
            // what will we do with ear?
            return(eat);
        }
Ejemplo n.º 2
0
 public bool Income(int vkCode,bool gis,bool shf,KeyboardLayout kl)
 {
     Key k = new Key();
     k.alt = gis;
     k.shift = shf;
     k.vkCode = vkCode;
     if (k.vkCode == 8)
         k.ch = "delete";
     else
     {
         if (mfm != null)
         {
             if (mfm.dkstate != "none")
             {
                 k = kl.ProcessKey(k, mfm.dkstate);
                 k.ch = k.ch.Replace("◌", "");
             }
             else
             {
                 k = kl.ProcessKey(k);
                 k.ch = k.ch.Replace("◌", "");
             }
         }
     }
     if (k.ch.StartsWith("[") && k.ch.EndsWith("]"))
     {
         if (mfm != null)
         {
             mfm.dkChange(k.ch.Replace("[", "").Replace("]", ""));
             return true;
         }
     }
     else
     {
         mfm.dkChange("none");
     }
     bool eat = false;
     foreach (string s in CompatibilityDecompose(k.ch))
     {
         eat = eat | Income(s);
     }
     // what will we do with ear?
     return eat;
 }
Ejemplo n.º 3
0
 internal void SetActiveLayout(MyInput.Keyboard_Classes.KeyboardLayout kl)
 {
 }