mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
stand/lua: Always boot on 'enter' keypress in menus
This commit is contained in:
parent
e4039d68fb
commit
b458bf0da1
1 changed files with 5 additions and 2 deletions
|
|
@ -152,7 +152,7 @@ menu.welcome = {
|
|||
core.setSingleUser(false);
|
||||
core.boot();
|
||||
end,
|
||||
alias = {"b", "B", "\013"}
|
||||
alias = {"b", "B"}
|
||||
},
|
||||
|
||||
-- boot single user
|
||||
|
|
@ -272,9 +272,12 @@ function menu.run(m)
|
|||
while cont do
|
||||
local key = io.getchar();
|
||||
|
||||
-- Exit on backspace
|
||||
-- Special key behaviors
|
||||
if (key == 127) and (m ~= menu.welcome) then
|
||||
break
|
||||
elseif (key == 13) then
|
||||
core.boot();
|
||||
-- Should not return
|
||||
end
|
||||
|
||||
key = string.char(key)
|
||||
|
|
|
|||
Loading…
Reference in a new issue