Hide the iOS keyboard
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Hide the iOS keyboard
Hi,
I set up a user input field in iOS and have a button that takes care gathering the input and taking care of business. Hitting the return key does the same and then hides the keyboard. My question is what code takes care of hiding the keyboard if the user chooses my button rather than the return key on the keyboard?
Thanks,
Dave
I set up a user input field in iOS and have a button that takes care gathering the input and taking care of business. Hitting the return key does the same and then hides the keyboard. My question is what code takes care of hiding the keyboard if the user chooses my button rather than the return key on the keyboard?
Thanks,
Dave
-
- Livecode Opensource Backer
- Posts: 1336
- Joined: Sun Jul 12, 2009 10:53 am
- Location: Bordeaux, France
Re: Hide the iOS keyboard
Dave...
put
in the script of your button... the keyboard will be deactivated
be well
Dixie
put
Code: Select all
on mouseUp
focus on nothing
end mouseUp
be well
Dixie
Re: Hide the iOS keyboard
Wow... Like deep meditation. Focus on nothing. Like it. Thanks!
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Hide the iOS keyboard
Hi All,
Is there a way to hide the ios keyboard definitively because I use a custom keyboard with accentued letters which can be with blue2 switch (one or two input) ?
I played with" focus on nothing" but keyboard is shown when i click on a field
with traversalon = true.
From the doc I understand that keyboardActivated is sent to the card AFTER keyboard is shown.
I thought a type "none" for mobileSetKeyboardType, but not.
Best regards
Jean-Marc
Is there a way to hide the ios keyboard definitively because I use a custom keyboard with accentued letters which can be with blue2 switch (one or two input) ?
I played with" focus on nothing" but keyboard is shown when i click on a field
with traversalon = true.
From the doc I understand that keyboardActivated is sent to the card AFTER keyboard is shown.
I thought a type "none" for mobileSetKeyboardType, but not.
Best regards
Jean-Marc
https://alternatic.ch
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: Hide the iOS keyboard
Did you already try to handle things in "focusIn"?
Just an idea.
Just an idea.
shiftLock happens
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Hide the iOS keyboard
Guten Tag Hermann,
Thanks
I will try a lockmessages at openfield
All the best
Jean-Marc
Thanks
No. It seems that openfield is sent instead focusin when the target field is unlocked.Did you already try to handle things in "focusIn"?
I will try a lockmessages at openfield
All the best
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
I tried lockmessages at open field but nothing change, (iOS keyboard comes).
https://alternatic.ch
-
- Livecode Opensource Backer
- Posts: 1336
- Joined: Sun Jul 12, 2009 10:53 am
- Location: Bordeaux, France
Re: Hide the iOS keyboard
Hi Jean-Marc...
You mention that you wish to use your own custom keyboard... I have sent you a stack that just uses two fields... a very poor 'custom' keyboard, that I guess if you grouped the buttons, you could slide it up and down.. .. but with the use of two behavious ( I have left the behaviour buttons visible for you to see the script... it acts more or less like a keyboard... the behaviours are set up in the card script...
It might work for you
Dixie..
You mention that you wish to use your own custom keyboard... I have sent you a stack that just uses two fields... a very poor 'custom' keyboard, that I guess if you grouped the buttons, you could slide it up and down.. .. but with the use of two behavious ( I have left the behaviour buttons visible for you to see the script... it acts more or less like a keyboard... the behaviours are set up in the card script...
It might work for you
Dixie..
- Attachments
-
- keytest.zip
- (1.5 KiB) Downloaded 308 times
Last edited by Dixie on Sun Jan 22, 2017 3:11 pm, edited 1 time in total.
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: Hide the iOS keyboard
Hi Jean-Marc and John.
That's a nice trick, 'dixie'.
I avoided mobile until now, but my childs started to 'force' me to build some apps for them. So I tried here to achieve a not-popup of the keyboard when starting to edit a field. And it works here (in the simulator) by simply catching the openField, the keyboard doesn't pop up.
Am I wrong with that beginner's approach?
H.
That's a nice trick, 'dixie'.
I avoided mobile until now, but my childs started to 'force' me to build some apps for them. So I tried here to achieve a not-popup of the keyboard when starting to edit a field. And it works here (in the simulator) by simply catching the openField, the keyboard doesn't pop up.
Code: Select all
on openField
-- do nothing and don't pass
end openField
H.
shiftLock happens
-
- Livecode Opensource Backer
- Posts: 1336
- Joined: Sun Jul 12, 2009 10:53 am
- Location: Bordeaux, France
Re: Hide the iOS keyboard
Hermann...
Are you wrong with your approach ?... I don't know, It did not occur to me !...
Dixie
Are you wrong with your approach ?... I don't know, It did not occur to me !...
Dixie
-
- Livecode Opensource Backer
- Posts: 1336
- Joined: Sun Jul 12, 2009 10:53 am
- Location: Bordeaux, France
Re: Hide the iOS keyboard
Jean-Marc..
I just had a thought that you could also popUp an overlay on a letter.. say, by using 'a mouseStillDown' handler on a button 'E', you could then show more 'E's' with the accents on them... just like the regular iOS keyboard does..
I just had a thought that you could also popUp an overlay on a letter.. say, by using 'a mouseStillDown' handler on a button 'E', you could then show more 'E's' with the accents on them... just like the regular iOS keyboard does..
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Hide the iOS keyboard
Yes, I did one because that is what I want avoid.just like the regular iOS keyboard does..
I choosed to make a line of the keyboard with accented letters. First line of keyboard is used for accented letters, ponctuation and numeric keyboard.
The keyboard can be use with the mouse and with a switch with 2 inputs NextObject and ClickCurObject.
I also want put the letter into the selectedchunk and not just after last char.
This stack does words prediction while the user write.
Once I cleaned the stack I post it.
Fld script
Code: Select all
on selectionChanged
doMajStartEndW
end selectionChanged
on openfield
-- set the lockmessages to true --avoid ios keyboard doesn't work
doMajStartEndW
--set the lockmessages to false
end openfield
on closefield
doMajStartEndW
end closefield
on exitfield
doMajStartEndW
end exitfield
on textChanged
-- set the lockmessages to true --avoid ios keyboard doesn't work
defTextTC --•• prediction words
--set the lockmessages to false
end textChanged
on mouseleave
doMajStartEndW
end mouseleave
Code: Select all
local sStartCurWord,sEndCurWord
--store selected chunk in locals sStartCurWord sEndCurWord
on doMajStartEndW
if char-1 of the selectedfield <> the num of fld "fText" then
exit doMajStartEndW
else
get the selectedchunk
put word 2 of it into sStartCurWord
put word 4 of it into sEndCurWord
end if
end doMajStartEndW
on defTextTC
--••prediction words
defTextTC
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
I tested on device with just this script fld
The iOS keyboard comes.
Jean-Marc
Code: Select all
on openfield
end openfield
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
@ John,
Here is a keyboard with custom cursor I used. It work on iOS except the keyboard which comes at each open field
http://forums.livecode.com/viewtopic.php?f=8&t=28073
I work for a new version for one bluetooth switch with two inputs
Kind regards
Jean-Marc
Here is a keyboard with custom cursor I used. It work on iOS except the keyboard which comes at each open field
http://forums.livecode.com/viewtopic.php?f=8&t=28073
I work for a new version for one bluetooth switch with two inputs
Kind regards
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
I maybe found a way to use a locked field like an unlocked field to avoid iOS keyboard.
I use a btn as custom cursor.
That was a sweet surprise that it seems work, iOS keyboard doesn't appear
I use a btn as custom cursor.
That was a sweet surprise that it seems work, iOS keyboard doesn't appear
- Attachments
-
- keyboardLocktext.livecode.zip
- (3.21 KiB) Downloaded 406 times
https://alternatic.ch