Page 1 of 2
IOS Keyboard Display hidden
Posted: Thu Aug 22, 2013 10:32 pm
by maxs
Is there any way to create a smaller number only keyboard? The IOS number keyboard is way too big.
Thank you
Max
Re: IOS Keyboard Display hidden
Posted: Sat Aug 24, 2013 7:43 am
by maxs
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
Re: IOS Keyboard Display hidden
Posted: Sat Aug 24, 2013 7:54 am
by Simon
I guess, make your own keyboard group and apply it's output to the label of a button that looks like a field.
Simon
Re: IOS Keyboard Display hidden
Posted: Tue Aug 27, 2013 6:30 pm
by endernafi
Hi Max,
This may give you an idea:
* 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
Re: IOS Keyboard Display hidden
Posted: Tue Aug 27, 2013 7:53 pm
by Simon
* 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
Re: IOS Keyboard Display hidden
Posted: Wed Aug 28, 2013 2:16 am
by maxs
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
Re: IOS Keyboard Display hidden
Posted: Wed Aug 28, 2013 9:16 am
by endernafi
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
Re: IOS Keyboard Display hidden
Posted: Thu Aug 29, 2013 3:21 am
by maxs
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
Re: IOS Keyboard Display hidden
Posted: Fri Aug 30, 2013 4:44 am
by maxs
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
Re: IOS Keyboard Display hidden
Posted: Fri Aug 30, 2013 4:56 am
by endernafi
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
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
I'll work on your code as soon as I'm sane again maybe in a couple of hours
Actually, this approach might benefit one of my projects, too.
{edit: *approach* = *a custom keypad*}
Best,
~ Ender Nafi
Re: IOS Keyboard Display hidden
Posted: Fri Aug 30, 2013 5:20 am
by maxs
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
Re: IOS Keyboard Display hidden
Posted: Fri Aug 30, 2013 5:48 am
by endernafi
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
Re: IOS Keyboard Display hidden
Posted: Sat Aug 31, 2013 6:12 am
by maxs
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
Re: IOS Keyboard Display hidden
Posted: Sat Aug 31, 2013 7:07 am
by Simon
This is one of those cool stories.
LC is a programming language, one isn't stuck with what everyone else has.
Simon
Re: IOS Keyboard Display hidden
Posted: Sat Aug 31, 2013 4:02 pm
by endernafi
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