IOS Keyboard Display hidden

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

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

IOS Keyboard Display hidden

Post by maxs » Thu Aug 22, 2013 10:32 pm

Is there any way to create a smaller number only keyboard? The IOS number keyboard is way too big.

Thank you
Max

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

Re: IOS Keyboard Display hidden

Post by maxs » Sat Aug 24, 2013 7:43 am

This is so important to me. I even submitted a tech support request to Apple. But they will not help me. They referred me to Livecode support, even though Apple seems to be in control of their keyboards.

Anyway the keyboard takes up half my space on the ipad . I only need it to input numbers into fields. So can't I create my own keyboard?

Has anyone done that?

DO I need to go outside Livecode to get this done?

Any advice would be appreciated.

Max

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: IOS Keyboard Display hidden

Post by Simon » Sat Aug 24, 2013 7:54 am

I guess, make your own keyboard group and apply it's output to the label of a button that looks like a field.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Re: IOS Keyboard Display hidden

Post by endernafi » Tue Aug 27, 2013 6:30 pm

Hi Max,

This may give you an idea:
simpleNumPad.zip
(2.03 KiB) Downloaded 373 times
* It's very primitive, you should skin it and make adjustments in code specific to your project.
* Try on an iphone3 or 4, it's not suitable for iphone5's 4-inch screen. But it's easy to do.
* Click on any field and keyboard will pop out, click outside of the fields and it'll hide.
* You should add a nice ease-in or ease-out effect via animation engine or self-coding.
* Fields' lockText should be checked and traversalOn should be unchecked.
Otherwise, the native keyboard will cover the screen. I don't know any other method to prevent it.
Or you can use field-looking buttons as Simon suggested.

Hope it helps...

Best,

~ Ender Nafi
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: IOS Keyboard Display hidden

Post by Simon » Tue Aug 27, 2013 7:53 pm

* Fields' lockText should be checked and traversalOn should be unchecked.
Otherwise, the native keyboard will cover the screen
Yeah, the button idea was to avoid any confusion on that.
Your example showed the whole solution well.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

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

Re: IOS Keyboard Display hidden

Post by maxs » Wed Aug 28, 2013 2:16 am

HI Ender,

You have a nice solution to the keyboard problem. Thank you for taking the time to put it together.


My program has alot of flds, and it must include the blinking text beam, and a returnkey handler to work at the professional level I require.

I'm wondering if there may be a solution outside of livecode for a custom keyboard or some way to disable the IOS keybard and still use text fields?


Thanks again, Max

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Re: IOS Keyboard Display hidden

Post by endernafi » Wed Aug 28, 2013 9:16 am

Hi Max,

You can always write an external or hire someone to do that for you.
Monte Goulding and many other fellow developers here may be available.

If you prefer to write one on your own, check these links:
how to create a custom keypad in xCode and how to write an external for LiveCode.

Best,

~ Ender Nafi
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

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

Re: IOS Keyboard Display hidden

Post by maxs » Thu Aug 29, 2013 3:21 am

I didn't know that a custom keyboard could be made in X-code. For my purposes that may be the best route. Thank you for continuing to help me. I'll contact Monte Goulding.

Thanks, Max

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

Re: IOS Keyboard Display hidden

Post by maxs » Fri Aug 30, 2013 4:44 am

Hi Ender,

After looking a half a dozen solutions, yours appears to be the best.

I was able to attach a blinking i-beam to the field, but I can't integrate it into your stack or send a return-in-field command to the selected field.

Here are my two scripts. Can they be integrated into your code?
Max

on mouseUp
-- this should be in the returninfield script of the field
global StopIbeam
put empty into StopIbeam
answer "The I-beam has Disappeared." --- or whatever the command is
end mouseUp

on mouseUp
global StopIbeam
put "on" into StopIbeam
send FakeIbeam to me in 20 ticks
end mouseUp

on FakeIbeam
global StopIbeam
if StopIbeam = "on"
then
put "|" after fld "inputBox1"
wait 20 ticks
delete last char of fld "inputBox1"
send mouseup to me
end if
end FakeIbeam

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Re: IOS Keyboard Display hidden

Post by endernafi » Fri Aug 30, 2013 4:56 am

Hello Max,

Can you wait a little?
I don't know if I can come with a decent solution but even if I could it's not gonna happen now.
See, it's early in the morning here and I'm coding for 17 hours straight, well I'm about to collapse, literally :shock:

I'm seriously thinking about to go neolithic, i.e live a hunter-gatherer life deep in the woods away from any silicon-based life forms 8)

I'll work on your code as soon as I'm sane again maybe in a couple of hours :wink:
Actually, this approach might benefit one of my projects, too.
{edit: *approach* = *a custom keypad*}


Best,

~ Ender Nafi
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

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

Re: IOS Keyboard Display hidden

Post by maxs » Fri Aug 30, 2013 5:20 am

Hey Ender,


I'm in no hurry at all.

Also, I don't mind paying for your time. You were kind enough already to work on that little stack just to help me.


Thanks,
Max

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Re: IOS Keyboard Display hidden

Post by endernafi » Fri Aug 30, 2013 5:48 am

simpleNumPad_ver2.zip
(2.69 KiB) Downloaded 358 times
Notes:

* You can't use built-in messages like enterKey, returnInField, etc.
Because we locked the fields, there's no keyboard.
But we have a custom keypad.
So, you can place a custom enter key into it.
Check the code for a demo.

* My method for flashing that beam is a bit expensive, I'm aware.
But it's on purpose. You can use that crawler for many more things like spellchecking.
Check the comments inside the stack.

* That pipe | char doesn't look good, at all. You can pretty it up.
Check the imageSource property in the dictionary.
You have to theme & skin all the controls, anyhow.


Hope it helps...

Best,

~ Ender Nafi
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

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

Re: IOS Keyboard Display hidden

Post by maxs » Sat Aug 31, 2013 6:12 am

Hi Ender,

This stack is really shaping up well.

My background is black. Is it possible to set the textcolor for the single last digit (i-beam) to yellow?

Thank you again. It sounded like you may have use for this stack too. It's a good solution to liberate the programmer from this IOS standard keyboard.

Max

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: IOS Keyboard Display hidden

Post by Simon » Sat Aug 31, 2013 7:07 am

This is one of those cool stories.
LC is a programming language, one isn't stuck with what everyone else has. :)

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Re: IOS Keyboard Display hidden

Post by endernafi » Sat Aug 31, 2013 4:02 pm

Code: Select all

if "|" is in tText then
    set the textColor of char offset("|",tText) of tField to "yellow"
end if
Put it inside the crawlTheFields handler, right after the first set the text of tField to tText code.
There are two instances of it, put that code snippet after the first one.

I'd prefer a smoother color, though, instead of yellow; maybe "255,252,234" or "255,246,214".


Best,

~ Ender Nafi
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

Post Reply