Page 1 of 1

Custom Keyboards

Posted: Sat Dec 20, 2014 11:07 pm
by maxs
How about Custom Keyboards for ios?

Re: Custom Keyboards

Posted: Sun Dec 21, 2014 11:50 am
by jmburnod
Hi Maxs,
I made a custom keyboard for IOS because that is necessary to put a control over the keyboard for my practice.
I'm curious to know why do you need a custom keyboard.
Best regards
Jean-Marc

Re: Custom Keyboards

Posted: Sun Dec 21, 2014 5:23 pm
by maxs
Hi Jean-Marc.

I have been writing some Math apps which require a numeric keyboard. The standard Numeric keyboard on IOS covers over half of the screen. This is awful. I actually had to stop my development of my Math apps for over a year, waiting for a solution. Livecode tech team could not help me. Malte had a terrific solution for a fake one, that didn't quite work for my particular app. I post a request here every 3 or 4 months hoping someone has figured out how to make a custom keyboard for Livecode.

I heard that the new IOS allows for custom keyboards. But I don't even know how to get started making one that will work within Livecode. Can you give me a clue?

Thanks, Max

Re: Custom Keyboards

Posted: Sun Dec 21, 2014 5:59 pm
by jmburnod
Hi Max,
Can you give me a clue?
Yes. A simple group of buttons.

Re: Custom Keyboards

Posted: Sun Dec 21, 2014 6:27 pm
by maxs
I tried a simple group of buttons, but the blinking insertion point in a field forces the IOS keyboard to appear. The only way to dismiss the keyboard is to close the field. I really need to replace the keyboard completely with a IOS custom keyboard so I can still use the insertion marker, and not have that huge numeric keyboard cover half my screen.

Re: Custom Keyboards

Posted: Sun Dec 21, 2014 6:28 pm
by dunbarx
Hi.

I do not write for mobile, but was intrigued by the very term "custom keyboard". So when Jean-Marc suggested a group of buttons, is that all there is to the query? It is not a platform-specific object class?

Craig

Re: Custom Keyboards

Posted: Sun Dec 21, 2014 8:31 pm
by maxs
I'm not exactly sure what this means: platform-specific object class

but it appears that the keyboard needs to be made outside Livecode and somehow plug into it. It seems Livecode cannot control to allow the openfield to disable the usual IOS keyboard from appearing.

Max

Re: Custom Keyboards

Posted: Sun Dec 21, 2014 8:56 pm
by SparkOut
I don't know... but guessing...
If you set the locktext of the field to true does that suppress the iOS keyboard from appearing?
If having locktext on the field means you can't get the messages you need, you could possibly put an almost transparent graphic over the field and add your handlers there.

Re: Custom Keyboards

Posted: Sun Dec 21, 2014 9:01 pm
by Randy Hengst
Max, I have written many iOS apps. With desktop apps I used a custom "keyboard" and incoporated code for the "real" keyboard. Because of the issue you raised Max, about the iOS keyboard covering so much of the screen, I only use "custom" keyboard made with the "button" suggestion earlier. I've attached screen shots of two different apps. The buttons contain a handler that saves the input to a variable that is then placed in a field… therefore, no cursor needs to be active… and, hence, no iOS keyboard pops up.

be well,
randy

Re: Custom Keyboards

Posted: Sun Dec 21, 2014 11:35 pm
by jmburnod
Craig,
It is not a platform-specific object class?
Yes. It is the same for OSX, Window and IOS tested and I think the same for Androïd.
Just a group of btns.

Re: Custom Keyboards

Posted: Mon Dec 22, 2014 3:20 am
by maxs
Hi Randy,

Yes, this solution looks fine for simple stacks. I have over 100 fields all using return-in-field messages to send commands. Malte provided me a 'fake' insertion point over a locked field which worked fine for a few fields. But with a complicated stack like mine, it was a nightmare to reprogram, and I started getting tons of error messages. (Also, the insertion mark was so fake looking,)

I've seen apps with small keyboards which work with real fields. I was told that the new version of IOS would be allowing them. But I cannot find any info about that. I would love to know if anyone has found a solution using unlocked fields.

Thanks, Max

Re: Custom Keyboards

Posted: Mon Dec 22, 2014 10:08 pm
by jmburnod
Hi Max,
Why not build a group with a fld's behavior instead a fld ?
I mean a btn for each char and a grc like insertion point.
I'm dreaming or is that a way to satisfy your need :roll:
Best regards
Jean-Marc

Re: Custom Keyboards

Posted: Mon Dec 22, 2014 11:45 pm
by maxs
Jean-Mark.

I've attached this file created by Ender. It seems similar to what you described. But for my complicated stack it caused too many errors.

I need an IOS friendly keyboard. Thanks for replying. I've never had a Livecode problem that lasted this long. I've always believed Livecode can do anything. My next step to to find someone who can write an external.

Thank you,

Max

Re: Custom Keyboards

Posted: Thu Dec 25, 2014 4:12 am
by maxs
I see that they are selling custom keyboards in the App store. It seems that a keyboard can be made to work with Livecode . So can a keyboard be built as an external that can be brought into Livecode? Is there any programmer out there who can do this?

Max

Here is what I found:
We are going to look at two ways to build a keyboard’s UI – programmatically and using an Interface Builder document. The method you pick is a matter of preference, but I find that if the keyboard UI is complicated, it is better to use an Interface Builder document where you’ll be able to use Auto Layout and preview the effects of the constraints you’ve added without running the app, while in the case of creating the UI in code, you’ll end up writing a lot of code to set up constraints, which you can only see the effects of by running the project. Debugging this can be a bit of a headache.