stand/lua: Exit sub-menus on backspace

This commit is contained in:
kevans 2018-02-14 20:18:23 +00:00
parent d2bcc1e2c3
commit 29b1a3d97d

View File

@ -270,8 +270,14 @@ function menu.run(m)
cont = true; cont = true;
while cont do while cont do
local key = string.char(io.getchar()); local key = io.getchar();
-- Exit on backspace
if (key == 127) and (m ~= menu.welcome) then
break
end
key = string.char(key)
-- check to see if key is an alias -- check to see if key is an alias
local sel_entry = nil; local sel_entry = nil;
for k, v in pairs(alias_table) do for k, v in pairs(alias_table) do