0

Every time I use my keybindings I get an error

/usr/share/awesome/lib/awful/key.lua:42: attempt to call upvalue 'press' (a string value)

Line 42:

 ret[#ret]:connect_signal("press", function(kobj, ...) press(...) end)

Here's all the lines around it

--- Create a new key to use as binding.
-- This function is useful to create several keys from one, because it will use
-- the ignore_modifier variable to create more key with or without the ignored
-- modifiers activated.
-- For example if you want to ignore CapsLock in your keybinding (which is
-- ignored by default by this function), creating key binding with this function
-- will return 2 key objects: one with CapsLock on, and the other one with
-- CapsLock off.
-- @see key
-- @return A table with one or several key objects.
function key.new(mod, _key, press, release)
    local ret = {}
    local subsets = util.subsets(ignore_modifiers)
    for _, set in ipairs(subsets) do
        ret[#ret + 1] = capi.key({ modifiers = util.table.join(mod, set),
                                   key = _key })
        if press then
            ret[#ret]:connect_signal("press", function(kobj, ...) press(...) end)
        end
        if release then
            ret[#ret]:connect_signal("release", function(kobj, ...) release(...) end)
        end
    end
    return ret
end
hjpotter92
  • 78,589
  • 36
  • 144
  • 183
Hae0
  • 55
  • 4
  • Whatever is calling `key.new` is passing 'press' as value for the `press` parameter, like `key.new(mod, key, 'press', release)`. Post the code that calls `key.new`. – Oliver Aug 23 '14 at 04:14
  • Your config calls `awful.key` with wrong arguments. Do as Scholii said and figure out which call that is. – Uli Schlachter Aug 24 '14 at 08:45

0 Answers0