keyboardWillHideCallback deos not work at all

,

Hi! I'm trying to use the keyboard, but it doesn't seem to work.
This is ran frame, the keyboard shows up all fine, but I couldn't make this run. It totally should do something, but it doesn't. Why?

if pd.keyboard.keyboardWillHideCallback == true then
        scene = "main"
        main_init()
        animation = {pd.keyboard.text, {gfx.image.new(400, 240, white)}}
end

The keyboard is shown, and when the user presses OK nothing happens.

You have to set a callback function for pd.keyboard.keyboardWillHideCallback (it is not a boolean property). This function will be called when before the keyboard hide animation begins.

function willHideCallback()
        scene = "main"
        main_init()
        animation = {pd.keyboard.text, {gfx.image.new(400, 240, white)}}
end

pd.keyboard.keyboardWillHideCallback = willHideCallback
2 Likes