Lua pushkey and getlin

Allow lua nh.pushkey to push multiple keys,
make getlin return the keys in the command queue.
This commit is contained in:
Pasi Kallinen
2026-01-22 18:16:51 +02:00
parent b9f8f845fc
commit 49a87bd09c
3 changed files with 35 additions and 1 deletions

View File

@@ -1381,7 +1381,10 @@ nhl_pushkey(lua_State *L)
if (argc == 1) {
const char *key = luaL_checkstring(L, 1);
cmdq_add_key(CQ_CANNED, key[0]);
while (*key) {
cmdq_add_key(CQ_CANNED, *key);
key++;
}
}
return 0;