Quantcast

Add support for the 'backspace' key, possibly

James Whitehead II [03-09-11 - 10:11]
Add support for the 'backspace' key, possibly
Filename
TestSuite.lua
Utils.lua
diff --git a/TestSuite.lua b/TestSuite.lua
index 79581f7..b18496c 100644
--- a/TestSuite.lua
+++ b/TestSuite.lua
@@ -188,6 +188,9 @@ local all_binding_types = {
     num = makebind("1"),
     foreign = makebind("ö"),
     fkey = makebind("F1"),
+    qkey = makebind("DOUBLEQUOTE"),
+    dash = makebind("DASH"),
+    bspace = makebind("BACKSPACE"),
     leftbutton = makebind("BUTTON1"),
     rightbutton = makebind("BUTTON2"),
     middlebutton = makebind("BUTTON3"),
diff --git a/Utils.lua b/Utils.lua
index 5931214..56003ff 100644
--- a/Utils.lua
+++ b/Utils.lua
@@ -231,6 +231,8 @@ function addon:GetCapturedKey(key)
         key = "DASH"
     elseif key == "\\" then
         key = "BACKSLASH"
+    elseif key == "\"" then
+        key = "DOUBLEQUOTE"
     else
         local buttonNum = key:match("Button(%d+)")
         if buttonNum and tonumber(buttonNum) <= 31 then
@@ -274,6 +276,8 @@ function addon:ConvertSpecialKeys(binding)
         key = "-"
     elseif key == "BACKSLASH" then
         key = "\\"
+    elseif key == "DOUBLEQUOTE" then
+        key = "\""
     end

     return tostring(mods) .. tostring(key)