Bindings: change API to make bindings module responsible for all bindings

This commit is contained in:
crater2150 2015-03-01 21:34:50 +01:00
parent 6a5115bc7b
commit 8abc0819df
3 changed files with 16 additions and 9 deletions

View file

@ -84,14 +84,14 @@ function tags.setup(setuptable)
end
end
function tags.extend_key_table(globalkeys)
function tags.create_bindings()
-- Compute the maximum number of digit we need, limited to 22
keynumber = 0
for s = 1, screen.count() do
keynumber = math.min(22, math.max(#(list[s]), keynumber));
end
local tagkeys = globalkeys or {}
local tagkeys = {}
-- Bind all key numbers to tags, using keycodes
for i = 1, keynumber do