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

@@ -121,3 +121,13 @@ for func, fval in pairs(tests) do
end
end
end
function test_getlin()
nh.pushkey("AbC");
local str = nh.getlin("What?");
if str ~= "AbC" then
error("nh.getlin fail, got \"" .. str .. "\"");
end
end
test_getlin();