In the GitHub you mention that "Panel and Tab widgets support onKey() event but it's not documented" - but how should it work? I tried it and only the Windows onKey event recognises the key pressed. How could the programme distinguish if the key is pressed in a panel widget or on the hole window widget?
local ui = require "ui"
local win = ui.Window("Panel.constructor() sample", "fixed", 320, 200)
local panel = ui.Panel(win, 0, 0, 100, 100)
panel.border = true
local entry1 = ui.Entry(panel, "LuaRT", 0, 0)
local entry2 = ui.Entry(panel, "LuaRT", 0, 30)
local entry11 = ui.Entry(win, "LuaRT", 0, 120)
local entry21 = ui.Entry(win, "LuaRT", 0, 150)
function panel:onKey(key)
win:status(key)
end
function win:onKey(key)
win:status(key)
end
ui.run(win):wait()