Allow the dash key to be bound without errors
James Whitehead II [10-14-10 - 22:34]
Allow the dash key to be bound without errors
diff --git a/Clique.lua b/Clique.lua
index d952afc..2cc8ce1 100755
--- a/Clique.lua
+++ b/Clique.lua
@@ -346,9 +346,14 @@ function addon:GetBindingAttributes(global)
-- This is a key binding, so we need a binding for it
local prefix, suffix = addon:GetBindingPrefixSuffix(entry)
+ local key = entry.key
- set[#set + 1] = B_SET:format(entry.key, suffix)
- clr[#clr + 1] = B_CLR:format(entry.key)
+ if key == "DASH" then
+ key = "-"
+ end
+
+ set[#set + 1] = B_SET:format(key, suffix)
+ clr[#clr + 1] = B_CLR:format(key)
end
end
end
diff --git a/Utils.lua b/Utils.lua
index 439821d..e1964be 100644
--- a/Utils.lua
+++ b/Utils.lua
@@ -178,6 +178,8 @@ function addon:GetCapturedKey(key)
key = "BUTTON2"
elseif key == "MiddleButton" then
key = "BUTTON3"
+ elseif key == "-" then
+ key = "DASH"
else
local buttonNum = key:match("Button(%d+)")
if buttonNum and tonumber(buttonNum) <= 31 then