Commit a0869f77 authored by Ivaria's avatar Ivaria
Browse files

WIP support for Apple CMD key

parent aeb13077
......@@ -428,10 +428,18 @@ VUHDO_MODIFIER_KEYS = {
["alt"] = "ALT-",
["ctrl"] = "CTRL-",
["shift"] = "SHIFT-",
["meta"] = "META-",
["altctrl"] = "ALT-CTRL-",
["altshift"] = "ALT-SHIFT-",
["altmeta"] = "ALT-META-",
["ctrlshift"] = "CTRL-SHIFT-",
["ctrlmeta"] = "CTRL-META-",
["shiftmeta"] = "SHIFT-META-",
["altctrlshift"] = "ALT-CTRL-SHIFT-",
["altctrlmeta"] = "ALT-CTRL-META-",
["altshiftmeta"] = "ALT-SHIFT-META-",
["ctrlshiftmeta"] = "CTRL-SHIFT-META-",
["altctrlshiftmeta"] = "ALT-CTRL-SHIFT-META-",
};
......@@ -440,10 +448,18 @@ VUHDO_KEYS_MODIFIER = {
["ALT-"] = "alt",
["CTRL-"] = "ctrl",
["SHIFT-"] = "shift",
["META-"] = "meta",
["ALT-CTRL-"] = "altctrl",
["ALT-SHIFT-"] = "altshift",
["ALT-META-"] = "altmeta",
["CTRL-SHIFT-"] = "ctrlshift",
["CTRL-META-"] = "ctrlmeta",
["SHIFT-META-"] = "shiftmeta",
["ALT-CTRL-SHIFT-"] = "altctrlshift",
["ALT-CTRL-META-"] = "altctrlmeta",
["ALT-SHIFT-META-"] = "altshiftmeta",
["CTRL-SHIFT-META-"] = "ctrlshiftmeta",
["ALT-CTRL-SHIFT-META-"] = "altctrlshiftmeta",
};
......@@ -468,14 +484,30 @@ VUHDO_WHEEL_BINDINGS = {
"CTRL-MOUSEWHEELDOWN",
"SHIFT-MOUSEWHEELUP",
"SHIFT-MOUSEWHEELDOWN",
"META-MOUSEWHEELUP",
"META-MOUSEWHEELDOWN",
"ALT-CTRL-MOUSEWHEELUP",
"ALT-CTRL-MOUSEWHEELDOWN",
"ALT-SHIFT-MOUSEWHEELUP",
"ALT-SHIFT-MOUSEWHEELDOWN",
"ALT-META-MOUSEWHEELUP",
"ALT-META-MOUSEWHEELDOWN",
"CTRL-SHIFT-MOUSEWHEELUP",
"CTRL-SHIFT-MOUSEWHEELDOWN",
"CTRL-META-MOUSEWHEELUP",
"CTRL-META-MOUSEWHEELDOWN",
"SHIFT-META-MOUSEWHEELUP",
"SHIFT-META-MOUSEWHEELDOWN",
"ALT-CTRL-SHIFT-MOUSEWHEELUP",
"ALT-CTRL-SHIFT-MOUSEWHEELDOWN",
"ALT-CTRL-META-MOUSEWHEELUP",
"ALT-CTRL-META-MOUSEWHEELDOWN",
"ALT-SHIFT-META-MOUSEWHEELUP",
"ALT-SHIFT-META-MOUSEWHEELDOWN",
"CTRL-SHIFT-META-MOUSEWHEELUP",
"CTRL-SHIFT-META-MOUSEWHEELDOWN",
"ALT-CTRL-SHIFT-META-MOUSEWHEELUP",
"ALT-CTRL-SHIFT-META-MOUSEWHEELDOWN",
};
......@@ -488,14 +520,30 @@ VUHDO_WHEEL_INDEX_BINDING = {
"ctrl2",
"shift1",
"shift2",
"meta1",
"meta2",
"altctrl1",
"altctrl2",
"altshift1",
"altshift2",
"altmeta1",
"altmeta2",
"ctrlshift1",
"ctrlshift2",
"ctrlmeta1",
"ctrlmeta2",
"shiftmeta1",
"shiftmeta2",
"altctrlshift1",
"altctrlshift2",
"altctrlmeta1",
"altctrlmeta2",
"altshiftmeta1",
"altshiftmeta2",
"ctrlshiftmeta1",
"ctrlshiftmeta2",
"altctrlshiftmeta1",
"altctrlshiftmeta2",
}
......
......@@ -277,17 +277,42 @@ local tDefaultWheelAssignments = {
["shift1"] = {"SHIFT-", "-w7", ""},
["shift2"] = {"SHIFT-", "-w8", ""},
["meta1"] = {"META-", "-w9", ""},
["meta2"] = {"META-", "-w10", ""},
["altctrl1"] = {"ALT-CTRL-", "-w9", ""},
["altctrl2"] = {"ALT-CTRL-", "-w10", ""},
["altshift1"] = {"ALT-SHIFT-", "-w11", ""},
["altshift2"] = {"ALT-SHIFT-", "-w12", ""},
["ctrlshift1"] = {"CTRL-SHIFT-", "-w13", ""},
["ctrlshift2"] = {"CTRL-SHIFT-", "-w14", ""},
["altmeta1"] = {"ALT-META-", "-w13", ""},
["altmeta2"] = {"ALT-META-", "-w14", ""},
["ctrlshift1"] = {"CTRL-SHIFT-", "-w15", ""},
["ctrlshift2"] = {"CTRL-SHIFT-", "-w16", ""},
["ctrlmeta1"] = {"CTRL-META-", "-w16", ""},
["ctrlmeta2"] = {"CTRL-META-", "-w17", ""},
["shiftmeta1"] = {"SHIFT-META-", "-w18", ""},
["shiftmeta2"] = {"SHIFT-META-", "-w19", ""},
["altctrlshift1"] = {"ALT-CTRL-SHIFT-", "-w20", ""},
["altctrlshift2"] = {"ALT-CTRL-SHIFT-", "-w21", ""},
["altctrlmeta1"] = {"ALT-CTRL-META-", "-w22", ""},
["altctrlmeta2"] = {"ALT-CTRL-META-", "-w23", ""},
["altshiftmeta1"] = {"ALT-SHIFT-META-", "-w20", ""},
["altshiftmeta2"] = {"ALT-SHIFT-META-", "-w21", ""},
["altctrlshift1"] = {"ALT-CTRL-SHIFT-", "-w20", ""},
["altctrlshift2"] = {"ALT-CTRL-SHIFT-", "-w21", ""},
["altctrlshift1"] = {"ALT-CTRL-SHIFT-", "-w20", ""},
["altctrlshift2"] = {"ALT-CTRL-SHIFT-", "-w21", ""},
["altctrlshift1"] = {"ALT-CTRL-SHIFT-", "-w15", ""},
["altctrlshift2"] = {"ALT-CTRL-SHIFT-", "-w16", ""},
};
......
......@@ -241,6 +241,7 @@ local function VUHDO_getWheelDefString()
tString = "";
for tIndex, tValue in pairs(VUHDO_WHEEL_BINDINGS) do
tAssignIdx = VUHDO_WHEEL_INDEX_BINDING[tIndex];
VUHDO_xMsg("VUHDO_getWheelDefString", tIndex, tValue, tAssignIdx or "nil");
tFriendSpell = VUHDO_SPELLS_KEYBOARD["HOSTILE_WHEEL"][tAssignIdx][3];
tHostSpell = VUHDO_SPELLS_KEYBOARD["WHEEL"][tAssignIdx][3];
......
......@@ -1149,3 +1149,8 @@ VUHDO_I18N_OVERSHIELD_BAR = "Overshield Bar";
VUHDO_I18N_SHOW_HEAL_ABSORB = "Show\nHeal Absorb";
VUHDO_I18N_HEAL_ABSORB_BAR = "Heal Absorb Bar";
VUHDO_I18N_META = "Meta / Command";
VUHDO_I18N_PLUS_META = "+Meta";
VUHDO_I18N_PLUS_CTRL_META = "+Ctrl+Meta";
VUHDO_I18N_PLUS_SHIFT_META = "+Shift+Meta";
......@@ -279,6 +279,14 @@
{ "SHIFT", VUHDO_I18N_SHIFT },
{ "CTRL", VUHDO_I18N_CTRL },
{ "ALT", VUHDO_I18N_ALT },
{ "META", VUHDO_I18N_META },
{ "ALT-META", VUHDO_I18N_ALT .. VUHDO_I18N_PLUS_META },
{ "CTRL-META", VUHDO_I18N_CTRL .. VUHDO_I18N_PLUS_META },
{ "SHIFT-META", VUHDO_I18N_SHIFT .. VUHDO_I18N_PLUS_META },
{ "CTRL-SHIFT-META", VUHDO_I18N_CONTROL .. VUHDO_I18N_PLUS_SHIFT_META },
{ "ALT-SHIFT-META", VUHDO_I18N_ALT .. VUHDO_I18N_PLUS_SHIFT_META },
{ "ALT-CTRL-META", VUHDO_I18N_ALT .. VUHDO_I18N_PLUS_CTRL_META },
{ "ALT-CTRL-SHIFT-META", VUHDO_I18N_ALT .. VUHDO_I18N_PLUS_CTRL .. VUHDO_I18N_PLUS_SHIFT_META },
}
);
......
......@@ -222,6 +222,7 @@ function VUHDO_spellsKeysLocalAssignKey(self, aKey)
return;
end
if (IsShiftKeyDown()) then
aKey = "SHIFT-"..aKey;
end
......@@ -234,6 +235,10 @@ function VUHDO_spellsKeysLocalAssignKey(self, aKey)
aKey = "ALT-" .. aKey;
end
if (IsMetaKeyDown()) then
aKey = "META-" .. aKey;
end
local tIsSameKey = VUHDO_SPELLS_KEYBOARD["INTERNAL"][tAssignIndex][2] == aKey;
local tFormerName = VUHDO_removeKeyFromList(aKey);
if (tFormerName == nil or tIsSameKey) then
......@@ -336,4 +341,4 @@ end
function VUHDO_spellsKeysLocalDiscardMacroClicked()
tMacroEditor:Hide();
VuhDoNewOptionsSpellKeysLocal:Show();
end
\ No newline at end of file
end
......@@ -91,26 +91,50 @@
local blacklistModi = VUHDO_CONFIG["CUSTOM_DEBUFF"].blacklistModi or "ALT-CTRL-SHIFT";
if blacklistModi ~= "OFF" then
if blacklistModi == "ALT-CTRL-SHIFT" and
IsAltKeyDown() and IsControlKeyDown() and IsShiftKeyDown() then
VUHDO_addDebuffToBlacklist(self);
if blacklistModi == "ALT-CTRL-SHIFT" and IsAltKeyDown()
and IsControlKeyDown() and IsShiftKeyDown() and not IsMetaKeyDown() then
VUHDO_addDebuffToBlacklist(self);
elseif blacklistModi == "ALT-CTRL-SHIFT-META" and IsAltKeyDown()
and IsControlKeyDown() and IsShiftKeyDown() and IsMetaKeyDown() then
VUHDO_addDebuffToBlacklist(self);
elseif blacklistModi == "CTRL-SHIFT-META" and IsControlKeyDown()
and IsShiftKeyDown() and IsMetaKeyDown() and not IsAltKeyDown() then
VUHDO_addDebuffToBlacklist(self);
elseif blacklistModi == "ALT-CTRL-META" and IsAltKeyDown()
and IsControlKeyDown() and IsMetaKeyDown() and not IsShiftKeyDown() then
VUHDO_addDebuffToBlacklist(self);
elseif blacklistModi == "ALT-SHIFT-META" and IsAltKeyDown()
and IsShiftKeyDown() and IsMetaKeyDown() and not IsControlKeyDown() then
VUHDO_addDebuffToBlacklist(self);
elseif blacklistModi == "ALT-SHIFT" and IsAltKeyDown() and
IsShiftKeyDown() and not IsControlKeyDown() then
IsShiftKeyDown() and not IsControlKeyDown() and not IsMetaKeyDown() then
VUHDO_addDebuffToBlacklist(self);
elseif blacklistModi == "ALT-CTRL" and IsAltKeyDown() and
IsControlKeyDown() and not IsShiftKeyDown() then
IsControlKeyDown() and not IsShiftKeyDown() and not IsMetaKeyDown() then
VUHDO_addDebuffToBlacklist(self);
elseif blacklistModi == "ALT-META" and IsAltKeyDown() and
IsMetaKeyDown() and not IsControlKeyDown() and not IsShiftKeyDown() then
VUHDO_addDebuffToBlacklist(self);
elseif blacklistModi == "CTRL-SHIFT" and IsControlKeyDown() and
IsShiftKeyDown() and not IsAltKeyDown() then
IsShiftKeyDown() and not IsAltKeyDown() and not IsMetaKeyDown() then
VUHDO_addDebuffToBlacklist(self);
elseif blacklistModi == "CTRL-META" and IsControlKeyDown() and
IsMetaKeyDown() and not IsAltKeyDown() and not IsShiftKeyDown() then
VUHDO_addDebuffToBlacklist(self);
elseif blacklistModi == "SHIFT-META" and IsShiftKeyDown() and
IsMetaKeyDown() and not IsAltKeyDown() and not IsControlKeyDown() then
VUHDO_addDebuffToBlacklist(self);
elseif blacklistModi == "META" and IsMetaKeyDown() and
not IsAltKeyDown() and not IsControlKeyDown() and not IsShiftKeyDown() then
VUHDO_addDebuffToBlacklist(self);
elseif blacklistModi == "SHIFT" and IsShiftKeyDown() and
not IsAltKeyDown() and not IsControlKeyDown() then
not IsAltKeyDown() and not IsControlKeyDown() and not IsMetaKeyDown() then
VUHDO_addDebuffToBlacklist(self);
elseif blacklistModi == "CTRL" and IsControlKeyDown() and
not IsAltKeyDown() and not IsShiftKeyDown() then
not IsAltKeyDown() and not IsShiftKeyDown() and not IsMetaKeyDown() then
VUHDO_addDebuffToBlacklist(self);
elseif blacklistModi == "ALT" and IsAltKeyDown() and
not IsControlKeyDown() and not IsShiftKeyDown() then
not IsControlKeyDown() and not IsShiftKeyDown() and not IsMetaKeyDown() then
VUHDO_addDebuffToBlacklist(self);
end
end
......
......@@ -945,10 +945,11 @@ end
function VUHDO_getCurrentKeyModifierString()
return format("%s%s%s",
return format("%s%s%s%s",
IsAltKeyDown() and "alt" or "",
IsControlKeyDown() and "ctrl" or "",
IsShiftKeyDown() and "shift" or "");
IsShiftKeyDown() and "shift" or "",
IsMetaKeyDown() and "meta" or "");
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment