Created
May 17, 2009 04:37
-
-
Save dylanwh/112923 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local make_keyspec = require("moonshine.ui.term").make_keyspec | |
local Tree = require "moonshine.tree" | |
local tree = Tree:new() | |
function M.bind(spec, name) | |
tree:insert( make_keyspec(spec), name) | |
end | |
-- called by on_keypress_raw() | |
function M.keypress(k) | |
-- FIXME | |
-- else | |
-- on_keypress(k) | |
-- end | |
end | |
function M.invoke(name) | |
local funcname = "kb_" .. name:gsub("[^a-zA-Z_]", "_") | |
_G[funcname]() | |
end | |
return M |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment