From 58974c8b32bf035c87e476f2746eb79d2f6b44ba Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Thu, 14 Oct 2010 23:34:07 +0100 Subject: [PATCH] Allow the dash key to be bound without errors --- Clique.lua | 9 +++++++-- Utils.lua | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) 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 -- 1.7.9.5