awful.key: Add a has_root_binding property and :trigger() method

This commit is contained in:
Emmanuel Lepage Vallee 2018-12-31 17:16:45 -05:00
parent 4f7388dd17
commit 02486b3479
1 changed files with 5 additions and 1 deletions

View File

@ -124,13 +124,17 @@ function key:trigger()
end
end
function key:get_has_root_binding()
return capi.root.has_key(self)
end
local function index_handler(self, k)
if key["get_"..k] then
return key["get_"..k](self)
end
if type(key[k]) == "function" then
return key[k](self)
return key[k]
end
local data = reverse_map[self]