Hide the iOS keyboard
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 1336
- Joined: Sun Jul 12, 2009 10:53 am
- Location: Bordeaux, France
Re: Hide the iOS keyboard
If you are writing for mobile then why do you need a cursor ?... and Jean-Marc, the stack I sent you uses locked fields so that the iOS keyboard does not pop-up... You are being a little confusing here about what you actually want to achieve...
dixie
dixie
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Hide the iOS keyboard
Hi John,
Jean-Marc
Because I want the user can watch where the typed letter will be placed.If you are writing for mobile then why do you need a cursor ?
Jean-Marc
https://alternatic.ch
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Hide the iOS keyboard
Hi,
Here is a new version of "stCustomCursorLockField"
The goal
choosing where we want insert or delete a char in a locked field to use it on ios and avoïd ios keyboard comes. Clic on a btn A or B to put A or B at the insertion point and DEL to delete char before insertion point
News
• Works with physical keyboard except for certains accented letters "`!^¨"
• Delete selection is better than first version (cursor placement was wrong)
To do
• A click after last char or before first char return empty for both. I used mouseh but I think that is not the best way.
Here is a new version of "stCustomCursorLockField"
The goal
choosing where we want insert or delete a char in a locked field to use it on ios and avoïd ios keyboard comes. Clic on a btn A or B to put A or B at the insertion point and DEL to delete char before insertion point
News
• Works with physical keyboard except for certains accented letters "`!^¨"
• Delete selection is better than first version (cursor placement was wrong)
To do
• A click after last char or before first char return empty for both. I used mouseh but I think that is not the best way.
- Attachments
-
- stCustomCursorLockField001.zip
- (5.14 KiB) Downloaded 284 times
https://alternatic.ch
-
- VIP Livecode Opensource Backer
- Posts: 3998
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Hide the iOS keyboard
Bonsoir Jean-Marc,
here is my version of handler defTextMu (only part of handler)
here is my take on handler placeMyCursor
The only difference in behavior I could see ist that if you click before line 2 at the left of the field it will now select after line 1.
Kind regards
Bernd
here is my version of handler defTextMu (only part of handler)
Code: Select all
if the selectedtext = empty then
put the selectedChunk into tChunk
get the mouseCharChunk
-- •• first char or last char
if it = empty then
put word 4 of tChunk into sMyNumChar
else
put word 2 of the mouseCharChunk into sMyNumChar
end if
select char sMyNumChar of fld "fText"
PlaceMyCursor
else
put word 2 of the mouseCharChunk into sMyNumChar
end if
Code: Select all
on placeMyCursor
put the formattedRect of the selectedText into tFormRect
select empty
set the bottomLeft of btn "bMyCursor" to item 3 of tFormRect -1, item 4 of tFormRect
show btn "bMyCursor"
doStartMyHiCursor
end placeMyCursor
Kind regards
Bernd
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Hide the iOS keyboard
Salut Bernd,
Thanks for help, it works better now.
Here is a new version with your suggestions and some news features
• A btn "cr" allows to put cr char after the current letter or instead selection
• Works with physical keyboard except for certains accented letters "`!^¨" (solved elsewhere)
Kind regards
Jean-Marc
Thanks for help, it works better now.
Here is a new version with your suggestions and some news features
• A btn "cr" allows to put cr char after the current letter or instead selection
• Works with physical keyboard except for certains accented letters "`!^¨" (solved elsewhere)
Kind regards
Jean-Marc
- Attachments
-
- stCustomCursorLockField002.zip
- (5.3 KiB) Downloaded 346 times
https://alternatic.ch
Re: Hide the iOS keyboard
Hi Guys,
Was there ever a definitive solution to disabling the keyboard on iOS when moving from an input field to a button? I am having the exact same problem as initially described by FireWorx.
I have an iOS card with an editable field "inputField", a button "pickIt" to display a pick-list (mobilepicklist), and a field "pickListChoice" to display the item chosen from the pick-list. This is what I'm finding happens:
1. The iOS keyboard pops up when you tap the editable field.
2. If you then tap the button to display the pick-list the keyboard disappears and the pick-list pops up
3. Once you've selected the pick-list item, the keyboard pops up again.
I've tried various techniques to try to turn the keyboard off, including:
a. focus on nothing
b. 'set lockText of field "InputField" to true' in the button handler - this does lock the field, but the keyboard still pops-up and lets you press buttons on it, but the text doesn't get put anywhere.
I have found that if you enter some text then press the 'Return' button on the iOS keyboard when in the input field, the keyboard does disappear (as I have travelsalOn) and the pickListChoice field receives 'focus' (kinda) ( i have "can receive keyboard focus" set for it). This fixes it partially, but only if the user presses the Return key on iOS.
I've run in to a slight issue with apps jamming when the user quickly jumps from a text input field to a pick list while the keyboard or pick-list animations are in progress on the iOS device - the app can get jammed as it appears that both the keyboard and the mobilepicklist pops up over the pick list but the pick list is the active control.
Thanks,
Al.
Was there ever a definitive solution to disabling the keyboard on iOS when moving from an input field to a button? I am having the exact same problem as initially described by FireWorx.
I have an iOS card with an editable field "inputField", a button "pickIt" to display a pick-list (mobilepicklist), and a field "pickListChoice" to display the item chosen from the pick-list. This is what I'm finding happens:
1. The iOS keyboard pops up when you tap the editable field.
2. If you then tap the button to display the pick-list the keyboard disappears and the pick-list pops up
3. Once you've selected the pick-list item, the keyboard pops up again.
I've tried various techniques to try to turn the keyboard off, including:
a. focus on nothing
b. 'set lockText of field "InputField" to true' in the button handler - this does lock the field, but the keyboard still pops-up and lets you press buttons on it, but the text doesn't get put anywhere.
I have found that if you enter some text then press the 'Return' button on the iOS keyboard when in the input field, the keyboard does disappear (as I have travelsalOn) and the pickListChoice field receives 'focus' (kinda) ( i have "can receive keyboard focus" set for it). This fixes it partially, but only if the user presses the Return key on iOS.
I've run in to a slight issue with apps jamming when the user quickly jumps from a text input field to a pick list while the keyboard or pick-list animations are in progress on the iOS device - the app can get jammed as it appears that both the keyboard and the mobilepicklist pops up over the pick list but the pick list is the active control.
Thanks,
Al.
-
- VIP Livecode Opensource Backer
- Posts: 7228
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Hide the iOS keyboard
Just a guess, but you could try
at the end of the button handler.
Code: Select all
send "focus on nothing" to me in 1 millisecond
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com