awful.key: Add more fields to the description

There is currently no centralized way to manage active keybindings so
the description data case be used to fill part of that role until an
official API is added.
This commit is contained in:
Emmanuel Lepage Vallee 2018-07-21 14:24:37 -04:00
parent 980c47d775
commit 3c79f1c8d5
1 changed files with 2 additions and 0 deletions

View File

@ -99,6 +99,8 @@ function key.new(mod, _key, press, release, data)
data = data and gtable.clone(data) or {} data = data and gtable.clone(data) or {}
data.mod = mod data.mod = mod
data.key = _key data.key = _key
data.press = press
data.release = release
table.insert(key.hotkeys, data) table.insert(key.hotkeys, data)
data.execute = function(_) key.execute(mod, _key) end data.execute = function(_) key.execute(mod, _key) end