Keyboard bug in 1.3 (not the undo bug)

When I change the keyboard to split view, the app pauses. I have to go to another app and come back for it to resume. It also doesn’t show a play button when frozen. I’ll add it to the issue tracker soon. Please to fix this and add topOfKeyboard() variable.
Thanks!

It’s not the undo bug, but that is a big bug.

Confirmed it. Sometimes I manage to split it without the freeze, but most of the time it does! Big bug indeed!

Thanks for reporting, but I am unable to reproduce this.

Here are my steps, am I missing anything?

  • Use showKeyboard() to show the keyboard in the viewer
  • Split the keyboard while the scene is animating
  • Everything continues as normal until I press the back button

I also tried splitting the keyboard in the editor before running the project and did not have any issues.

I reproduced it with this script

function setup()
    print("Tap to start editing")
    textWrapWidth(40000)
end

function touched(touch)
    --Show keyboard when the screen is touched
    showKeyboard()
end

function draw()
    background(40,40,50)
    fill(255)
    textMode(CORNER)
    buffer = keyboardBuffer()

    _,bufferHeight = textSize(buffer)
    if buffer then
        text( buffer, 10, HEIGHT - 30 - bufferHeight )
    end
end

@Simeon - Here are the steps:

  1. Use showKeyboard()
  2. Split the keyboard during animation
  3. Codea is frozen. Nothing works including the play button or back button. To continue the playing, go to another app and come back.
  4. The keyboard works fine then in split view, but when you put it back, it’s frozen again.
    But the keyboard works fine in full screen mode in split view. And again. Please add the feature of saying topOfKeyboard() for split keyboard view.
    Thanks.
    P.S. It’s on the issuer tracker.

@Simeon - Also, with the BlueTooth keyboard, the arrow keys work with keyboardBuffer(), but how do I know where the cursor is? And how do I know when the arrow keys are pressed? Also, the tab is returned as spaces, but I don’t care about that. What about the return key? How do you test if that was pressed? Can you add an option that it returns /n? That would make it when you’re drawing the text is easy.
Thanks!

Yeah the arrow keys work with keyboardBuffer(). I debated whether or not to allow that, and decided to allow it.

The return key does send "
" to the keyboard(key) function.

Odd, when I split the keyboard during animation the animation continues to play just fine.

@Simeon… FWIW: I’ve experienced the ‘freezing’ bug @Zoyt and @Herwig have mentioned (in practice I never have occasion to split the keyboard – because I never think of it – but tried it just now to see if I could reproduce the bug).

@Simeon - It works in full screen mode, but it freezes in normal mode.

I’ll have to experiment some more. I still can’t reproduce in fullscreen or standard display modes.

Let me get the code. One second…

@Simeon - Alright. Here it is:


function setup()
--    displayMode(FULLSCREEN)
    print("Hello World!")
    showKeyboard()
end

function draw()
    background(255, 255, 255, 255)
    strokeWidth(5)
 
    
    textMode(CORNER)
    buffer = keyboardBuffer()
    bufferHeight = textSize(buffer)
    if buffer then
        text(buffer, 10, 400)
    end
    
end

I think that will freeze Codea. LMK. I’m running a 64G iPad 2 on iOS 5.0.1 if that helps.

@Simeon - Figured it out - The keyboard buffer has to be empty. Then split the keyboard, and it freezes.

And in 1.3.1, can you please add topOfKeyboard() and isKeyboardShowing() please @Simeon?