Keyboard default callback does not fully implement the default behaviour?

It was my understanding, that the default keyboard event handler does everything needed to deal with the keyboard. So I thought that this:

scr = lv.obj()
kbd = lv.keyboard(scr)
kbd.align(lv.scr_act(), lv.ALIGN.CENTER, 0, 0)
lv.scr_load(scr)

behaves exactly the same as this:

def kbd_event_cb(obj, evt):
    obj.def_event_cb(evt);
    
scr = lv.obj()
kbd = lv.keyboard(scr)
kbd.align(lv.scr_act(), lv.ALIGN.CENTER, 0, 0)
kbd.set_event_cb(kbd_event_cb);
lv.scr_load(scr)

But it doesn’t. In the first case the keyboard can be closed with the X button, in the second it can’t. Why is there a difference in behaviour betwen these two cases?

Those two buttons are special-cased so that you can override their behavior while still using the default event handler for other keys.

You would want to catch LV_EVENT_CANCEL/LV_EVENT_APPLY and close the keyboard as necessary.

But wouldn’t that be easier if the default handler would deal with these as well and if I want to modify that behavior i simply wouldn’t call the default handler from my own event handler for these buttons?