protected override void WndProc(ref Message m) { switch (m.Msg) { case MKC.WM_HOTKEY: string modifier = KeyParse((int)m.LParam & 0xFFFF); int K = ((int)m.LParam >> 16) & 0xFFFF; string key = GetKeyName(K); if (VUIKeys.ContainsKey(modifier + key) == true) { (string Func, string Param) = FuncParse(VUIKeys[modifier + key]); if (API.GetPClass() == "MagicKeys") { List <string> VUFValues = Ini.IniReadValues(API.GetVUIPath() + API.GetVUI() + ".vuf", Func); VUFInvoke(VUFValues); } else { InvokeFromString(Func, Param); } } break; } base.WndProc(ref m); }
public static void KeyReg() { if (VUIKeys.ContainsKey("None") == false) { int IDKey = 0; foreach (var OBJKey in VUIKeys) { uint Mod = MKC.MOD_NOREPEAT; string[] KeyItems = OBJKey.Key.Split("+"); for (int K = 0; K < KeyItems.Length; K++) { if (KeyItems[K] == "Ctrl" | KeyItems[K] == "Alt" | KeyItems[K] == "Shift" | KeyItems[K] == "Win") { Mod = Mod | (uint)Enum.Parse(typeof(MKC.ModKeys), KeyItems[K]); } } try{ Keys key = (Keys)kc.ConvertFrom(KeyItems[^ 1]);