Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 0b8758b

Browse files
authored
Merge pull request #6648 from montegoulding/keyboardprops
[[ Bug 21464-7 ]] Keyboard properties
2 parents 1b9f253 + dc0a1b3 commit 0b8758b

31 files changed

+942
-174
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Name: mobileSetKeyboardDisplay
2+
3+
Type: command
4+
5+
Syntax: mobileSetKeyboardDisplay <mode>
6+
7+
Summary:
8+
Configures the mode in which the keyboard is displayed
9+
10+
Introduced: 9.5
11+
12+
OS: ios, android
13+
14+
Platforms: mobile
15+
16+
Example:
17+
mobileSetKeyboardDisplay "pan"
18+
19+
Example:
20+
mobileSetKeyboardDisplay "over"
21+
22+
Parameters:
23+
mode (enum):
24+
The mode of keyboard display to use. One of:
25+
26+
- "over": Display the keyboard over the current stack rect. Over is the default
27+
keyboard display mode
28+
- "pan": Pan the stack up so that the rect of the foucused object will be
29+
visible above the keyboard
30+
31+
Description:
32+
Use the <mobileSetKeyboardDisplay> command to configure the move of
33+
keyboard display.
34+
35+
The <mobileSetKeyboardDisplay> setting takes affect the next time the keyboard is
36+
shown. It does not affect the current keyboard, if it is being displayed.
37+
38+
References: keyboardDeactivated (message), keyboardActivated (message),
39+
mobileGetKeyboardDisplay (function)
40+

docs/dictionary/command/iphoneSetKeyboardReturnKey.lcdoc renamed to docs/dictionary/command/mobileSetKeyboardReturnKey.lcdoc

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,50 @@
1-
Name: iphoneSetKeyboardReturnKey
1+
Name: mobileSetKeyboardReturnKey
2+
3+
Synonyms: iphoneSetKeyboardReturnKey
24

35
Type: command
46

5-
Syntax: iphoneSetKeyboardReturnKey <returnKey>
7+
Syntax: mobileSetKeyboardReturnKey <returnKey>
68

79
Summary:
810
Configures the type of return key displayed on the keyboard.
911

1012
Introduced: 4.5.3
1113

12-
OS: ios
14+
Changes: LiveCode 9.5 added support for android
15+
16+
OS: ios, android
1317

1418
Platforms: mobile
1519

1620
Example:
17-
iphoneSetKeyboardReturnKey "alphabet"
21+
mobileSetKeyboardReturnKey "alphabet"
1822

1923
Example:
20-
iphoneSetKeyboardReturnKey "numeric"
24+
mobileSetKeyboardReturnKey "numeric"
2125

2226
Parameters:
2327
returnKey (enum):
2428
Specifies what the return key function is.
2529

2630
- default: the normal return key
2731
- go: the 'Go' return key
28-
- google: the 'Google' return key
29-
- join: the 'Join' return key
32+
- google: the 'Google' return key (iOS only)
33+
- join: the 'Join' return key (iOS only)
3034
- next: the 'Next' return key
31-
- route: the 'Route' return key
35+
- route: the 'Route' return key (iOS only)
3236
- search: the 'Search' return key
3337
- send: the 'Send' return key
34-
- yahoo: the 'Yahoo' return key
38+
- yahoo: the 'Yahoo' return key (iOS only)
3539
- done: the 'Done' return key
36-
- emergency call: the 'emergency call' return key
40+
- emergency call: the 'emergency call' return key (iOS only)
3741

3842

3943
Description:
40-
Use the iphoneSetKeyboardReturnKey command to configure the type of
44+
Use the mobileSetKeyboardReturnKey command to configure the type of
4145
return key displayed on the keyboard.
4246

43-
The <iphoneSetKeyboardReturnKey> command configures the type of return
47+
The <mobileSetKeyboardReturnKey> command configures the type of return
4448
key displayed on the keyboard
4549

4650
The return key type setting takes effect the next time the keyboard is
@@ -50,7 +54,10 @@ being focused, simply use the commands in an <openField> handler of the
5054
given field. The keyboard is only shown after this handler returns, so
5155
it is the ideal time to configure it.
5256

57+
>**Note:** If a field has a non-empty <returnKeyType> that value will override
58+
> the the value set by <mobileSetKeyboardReturnKey>.
59+
5360
References: mobileSetKeyboardType (command),
5461
keyboardDeactivated (message), keyboardActivated (message),
55-
openField (message)
62+
openField (message), returnKeyType (property)
5663

docs/dictionary/command/mobileSetKeyboardType.lcdoc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ The keyboard type setting takes affect the next time the keyboard is
4444
shown. It does not affect the current keyboard, if it is being
4545
displayed.
4646

47-
References: iphoneSetKeyboardReturnKey (command),
48-
keyboardDeactivated (message), keyboardActivated (message)
47+
>**Note:** If a field has a non-empty <keyboardType> that value will override
48+
> the the value set by <mobileSetKeyboardType>.
49+
50+
References: mobileSetKeyboardReturnKey (command),
51+
keyboardDeactivated (message), keyboardActivated (message),
52+
keyboardType (property)
4953

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Name: mobileGetKeyboardDisplay
2+
3+
Type: function
4+
5+
Syntax: mobileSetKeyboardDisplay()
6+
7+
Summary:
8+
Get the mode in which the keyboard is displayed
9+
10+
Introduced: 9.5
11+
12+
OS: ios, android
13+
14+
Platforms: mobile
15+
16+
Example:
17+
on keyboardActivated
18+
if mobileGetKeyboardDisplay() is "over" then
19+
layoutUI
20+
end if
21+
end keyboardActivated
22+
23+
Returns (enum):
24+
The mode of keyboard display to use. One of:
25+
26+
- "over": Display the keyboard over the current stack rect
27+
- "pan": Pan the stack up so that the rect of the foucused object will be
28+
visible above the keyboard
29+
30+
Description:
31+
Use the <mobileSetKeyboardDisplay> command to configure the move of
32+
keyboard display.
33+
34+
References: keyboardDeactivated (message), keyboardActivated (message),
35+
mobileSetKeyboardDisplay (command)
36+

docs/dictionary/message/keyboardActivated.lcdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ display layout to take account of the restricted screen area that is
2525
available.
2626

2727
References: mobileSetKeyboardType (command),
28-
iphoneSetKeyboardReturnKey (command), current card (glossary),
28+
mobileSetKeyboardReturnKey (command), current card (glossary),
2929
keyboardDeactivated (message)
3030

docs/dictionary/message/keyboardDeactivated.lcdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ display layout to take account of the restricted screen area that
2525
becomes available when the keyboard is hidden.
2626

2727
References: mobileSetKeyboardType (command),
28-
iphoneSetKeyboardReturnKey (command), current card (glossary),
28+
mobileSetKeyboardReturnKey (command), current card (glossary),
2929
keyboardActivated (message)
3030

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
Name: keyboardType
2+
3+
Type: property
4+
5+
Syntax: set the keyboardType of <field> to <type>
6+
Syntax: get the keyboardType of <field>
7+
8+
Summary:
9+
Configures the type of keyboard that is to be displayed.
10+
11+
Introduced: 9.5
12+
13+
Associations: field
14+
15+
OS: ios, android
16+
17+
Platforms: mobile
18+
19+
Example:
20+
set the keyboardType of field "cost" to "alphabet"
21+
22+
Example:
23+
set the keyboardType of field "name" to empty
24+
25+
Parameters:
26+
type (enum):
27+
The type of keyboard to use. One of:
28+
29+
- "": use the global value from mobileSetKeyboardType
30+
- "default": the alphabetic keyboard
31+
- "numeric": the numeric keyboard with punctuation
32+
- "url": the url entry keyboard (iOS only)
33+
- "number": the number pad keyboard
34+
- "phone": the phone number pad keyboard
35+
- "contact": the phone contact pad keyboard (iOS only)
36+
- "email": the email keyboard
37+
38+
Description:
39+
Use the <keyboardType> command to configure the type of keyboard that is to be
40+
displayed for a field. If set to empty which is the default the type set by the
41+
<mobileSetKeyboardType> command is used to configure the type of keyboard that
42+
is to be displayed.
43+
44+
The keyboard type setting takes affect the next time the keyboard is
45+
shown. It does not affect the current keyboard, if it is being displayed.
46+
47+
References: mobileSetKeyboardType (command),
48+
keyboardDeactivated (message), keyboardActivated (message)
49+
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
Name: returnKeyType
2+
3+
Type: property
4+
5+
Syntax: set the returnKeyType of <field> to <type>
6+
Syntax: get the returnKeyType of <field>
7+
8+
Summary:
9+
Configures the type of return key that is to be displayed on the keyboard.
10+
11+
Introduced: 9.5
12+
13+
Associations: field
14+
15+
OS: ios, android
16+
17+
Platforms: mobile
18+
19+
Example:
20+
set the returnKeyType of field "cost" to "go"
21+
22+
Example:
23+
set the returnKeyType of field "name" to empty
24+
25+
Parameters:
26+
type (enum):
27+
The type of return key to use. One of:
28+
29+
- "": use the global value from <mobileSetKeyboardReturnKey>
30+
- default: the normal return key
31+
- go: the 'Go' return key
32+
- google: the 'Google' return key (iOS only)
33+
- join: the 'Join' return key (iOS only)
34+
- next: the 'Next' return key
35+
- route: the 'Route' return key (iOS only)
36+
- search: the 'Search' return key
37+
- send: the 'Send' return key
38+
- yahoo: the 'Yahoo' return key (iOS only)
39+
- done: the 'Done' return key
40+
- emergency call: the 'emergency call' return key (iOS only)
41+
42+
Description:
43+
Use the <returnKeyType> command to configure the type of return key that is to be
44+
displayed for a field. If set to empty which is the default the type set by the
45+
<mobileSetKeyboardReturnKey> command is used to configure the type of return key
46+
that is to be displayed.
47+
48+
The return key type setting takes affect the next time the keyboard is
49+
shown. It does not affect the current keyboard, if it is being displayed.
50+
51+
References: mobileSetKeyboardReturnKey (command),
52+
keyboardDeactivated (message), keyboardActivated (message)
53+

docs/notes/bugfix-21464.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# mobileSetKeyboardReturnKey on android
2+
3+
The mobileSetKeyboardReturnKey is now supported on android and the iphoneSetKeyboardReturnKey
4+
synonym is now deprecated

docs/notes/bugfix-21465.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# New keyboardType field property
2+
3+
A new property has been added to fields to control the keyboard type displayed
4+
on the mobile keyboard.

0 commit comments

Comments
 (0)