summaryrefslogtreecommitdiff
path: root/keys.lua
diff options
context:
space:
mode:
Diffstat (limited to 'keys.lua')
-rw-r--r--keys.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/keys.lua b/keys.lua
new file mode 100644
index 0000000..1bb18e1
--- /dev/null
+++ b/keys.lua
@@ -0,0 +1,12 @@
+local K = {}
+
+--- Build actions table from simple mapping { [key] = fn, ... }
+function K.actions(map)
+ local t = {}
+ for k, fn in pairs(map) do
+ t[k] = fn
+ end
+ return t
+end
+
+return K