WOOPS fix keyboard.keys reverse (index->key) lookup

sorry, this has been broken for a while
This commit is contained in:
payonel 2017-11-25 00:07:59 -08:00
parent 2a3343391d
commit 43a4db05ec

View File

@ -134,7 +134,7 @@ setmetatable(keyboard.keys,
{ {
__index = function(tbl, k) __index = function(tbl, k)
if type(k) ~= "number" then return end if type(k) ~= "number" then return end
for name,value in pairs(tbl.keys) do for name,value in pairs(tbl) do
if value == k then if value == k then
return name return name
end end