returns the visual interpretation of the key bound to an extended command, or the ext cmd name if not bound to any key */ local helpkey = eckey("help"); */
| 1641 | or the ext cmd name if not bound to any key */ |
| 1642 | /* local helpkey = eckey("help"); */ |
| 1643 | staticfn int |
| 1644 | nhl_get_cmd_key(lua_State *L) |
| 1645 | { |
| 1646 | int argc = lua_gettop(L); |
| 1647 | |
| 1648 | if (argc == 1) { |
| 1649 | const char *cmd = luaL_checkstring(L, 1); |
| 1650 | char *key = cmd_from_ecname(cmd); |
| 1651 | |
| 1652 | lua_pushstring(L, key); |
| 1653 | return 1; |
| 1654 | } |
| 1655 | |
| 1656 | return 0; |
| 1657 | } |
| 1658 | |
| 1659 | /* add or remove a lua function callback */ |
| 1660 | /* callback("level_enter", "function_name"); */ |
nothing calls this directly
no test coverage detected