Keyobard get_active_btn_text()

Works when using lv_btnmatrix but not lv_keyboard.
Looking to capture the “Enter” key.

for lv_btnmatrix…

def kb_cb(obj, event):

	if event == lv.EVENT.CLICKED:
		txt = obj.get_active_btn_text()
		print("%s was pressed"%txt)

This should do the trick:

# Create a button with a label 

def kb_cb(obj, event):
	if event == lv.EVENT.CLICKED:
		txt = lv.btnmatrix.__cast__(obj).get_active_btn_text()
		print("%s was pressed"%txt)

kb = lv.keyboard(scr)
kb.set_event_cb(kb_cb)

Thank you…
Would never of figure that it out in a million years!

In the future this would be solved without casting (on v8):