How does the Codea text box work +3rd party keyboard read the code? (Question for Codea developers)


I have this concept for a keyboard geared for coding on the iPad that gives suggested typing and a more dynamic keyboard, among other things. Another possibility, due to the ability to know previous typed text, it might be interesting to create something like a visual game creator where you can put your cursor inside some text, it’ll read the code, deem it valid to edit, then bring up an editor. Those are just some concepts for what could be done with a keyboard + coding apps.

However, my question to @Simeon and @John (tagging him for the fun of it) is that wether all the code on the screen is really given to the keyboard to read. I recall you mentioning in the v2.0 beta chat that you were recoding how the editor worked. So does only a hidden text box or something along those lines display the editable code, or is it all the code?


Are you referring to the text entry within the viewer (i.e. showKeyboard)? Or the main code editor?

@Zoyt If you are talking about custom keyboards in iOS 8, this might help.

@Simeon - Within the editor. @Saturn031000 - I know how they work and how to make them, it’s a matter of if the Codea editor works like a standard text box, or if there is some altering for speed improvements.

@Zoyt the code editor is a custom view that conforms to the UITextInput family of protocols. So it’s like a UITextView written from scratch. Does that help?

@Simeon - Ya. Thanks. I’ll look into it and post an update on what I find.