--- nono/vm/lunakbd.cpp 2026/04/29 17:05:18 1.1.1.14 +++ nono/vm/lunakbd.cpp 2026/04/29 17:05:29 1.1.1.15 @@ -25,9 +25,6 @@ LunaKeyboard::LunaKeyboard() { led.resize(2); - event.func = ToEventCallback(&LunaKeyboard::Callback); - event.Regist("Keyboard/Mouse"); - monitor.func = ToMonitorCallback(&LunaKeyboard::MonitorUpdate); monitor.SetSize(40, 4); monitor.Regist(ID_MONITOR_KEYBOARD); @@ -48,6 +45,10 @@ LunaKeyboard::Init() sio = GetSIODevice(); + event.func = ToEventCallback(&LunaKeyboard::Callback); + event.SetName("Keyboard/Mouse"); + scheduler->RegistEvent(event); + return true; } @@ -433,7 +434,7 @@ LunaKeyboard::Command(uint32 data) uint f = data & 7; buzzer_msec = buzzer_msec_table[t]; buzzer_freq = buzzer_freq_table[f]; - putlog(1, "Command $%02x Buzzer %dmsec, %dHz", + putlog(1, "Command $%02x Buzzer %umsec, %uHz", data, buzzer_msec, buzzer_freq); uint64 now = scheduler->GetVirtTime();