Custom Keyboards

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderator: Klaus

Post Reply
maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am
Contact:

Custom Keyboards

Post by maxs » Sat Dec 20, 2014 11:07 pm

How about Custom Keyboards for ios?

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Custom Keyboards

Post by jmburnod » Sun Dec 21, 2014 11:50 am

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
https://alternatic.ch

maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am
Contact:

Re: Custom Keyboards

Post by maxs » Sun Dec 21, 2014 5:23 pm

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

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Custom Keyboards

Post by jmburnod » Sun Dec 21, 2014 5:59 pm

Hi Max,
Can you give me a clue?
Yes. A simple group of buttons.
https://alternatic.ch

maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am
Contact:

Re: Custom Keyboards

Post by maxs » Sun Dec 21, 2014 6:27 pm

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.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Custom Keyboards

Post by dunbarx » Sun Dec 21, 2014 6:28 pm

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
Last edited by dunbarx on Mon Dec 22, 2014 12:10 am, edited 1 time in total.

maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am
Contact:

Re: Custom Keyboards

Post by maxs » Sun Dec 21, 2014 8:31 pm

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

SparkOut
Posts: 2943
Joined: Sun Sep 23, 2007 4:58 pm

Re: Custom Keyboards

Post by SparkOut » Sun Dec 21, 2014 8:56 pm

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.

Randy Hengst
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 157
Joined: Thu Jun 29, 2006 4:16 pm

Re: Custom Keyboards

Post by Randy Hengst » Sun Dec 21, 2014 9:01 pm

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
Attachments
FactTriangles_3.jpg
FactTriangles_3.jpg (19.97 KiB) Viewed 6629 times
AddSubK1_6.jpg
AddSubK1_6.jpg (20.1 KiB) Viewed 6629 times

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Custom Keyboards

Post by jmburnod » Sun Dec 21, 2014 11:35 pm

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.
https://alternatic.ch

maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am
Contact:

Re: Custom Keyboards

Post by maxs » Mon Dec 22, 2014 3:20 am

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

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: Custom Keyboards

Post by jmburnod » Mon Dec 22, 2014 10:08 pm

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
https://alternatic.ch

maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am
Contact:

Re: Custom Keyboards

Post by maxs » Mon Dec 22, 2014 11:45 pm

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
Attachments
simpleNumPad_ver2.zip
(2.69 KiB) Downloaded 195 times

maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am
Contact:

Re: Custom Keyboards

Post by maxs » Thu Dec 25, 2014 4:12 am

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.

Post Reply