示例#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);
        }
示例#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;
 }
示例#3
0
 internal void SetActiveLayout(MyInput.Keyboard_Classes.KeyboardLayout kl)
 {
 }