Skip to content
This repository was archived by the owner on Apr 2, 2018. It is now read-only.

Commit 09cc5b2

Browse files
committed
deprecate
1 parent 9b7c416 commit 09cc5b2

File tree

2 files changed

+130
-127
lines changed

2 files changed

+130
-127
lines changed

README.md

Lines changed: 2 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -1,128 +1,3 @@
1-
Keyboard
2-
======
1+
### :point_right: Deprecated! Please use [`cordova-plugin-ionic-keyboard`](https://github.com/ionic-team/cordova-plugin-ionic-keyboard) :point_left:
32

4-
The `cordova.plugins.Keyboard` object provides functions to make interacting with the keyboard easier, and fires events to indicate that the keyboard will hide/show.
5-
6-
cordova plugin add ionic-plugin-keyboard --save
7-
8-
Methods
9-
-------
10-
11-
- cordova.plugins.Keyboard.hideKeyboardAccessoryBar
12-
- cordova.plugins.Keyboard.close
13-
- cordova.plugins.Keyboard.disableScroll
14-
- cordova.plugins.Keyboard.show
15-
16-
Properties
17-
--------
18-
19-
- cordova.plugins.Keyboard.isVisible
20-
21-
Events
22-
--------
23-
24-
These events are fired on the window.
25-
26-
- native.keyboardshow
27-
* A number `keyboardHeight` is given on the event object, which is the pixel height of the keyboard.
28-
- native.keyboardhide
29-
30-
31-
# API reference
32-
33-
Keyboard.hideKeyboardAccessoryBar
34-
=================
35-
36-
Hide the keyboard accessory bar with the next, previous and done buttons.
37-
38-
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
39-
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(false);
40-
41-
Supported Platforms
42-
-------------------
43-
44-
- iOS
45-
46-
47-
Keyboard.close
48-
=================
49-
50-
Close the keyboard if it is open.
51-
52-
cordova.plugins.Keyboard.close();
53-
54-
Supported Platforms
55-
-------------------
56-
57-
- iOS, Android, Blackberry 10, Windows
58-
59-
60-
Keyboard.disableScroll
61-
=================
62-
63-
Prevent the native UIScrollView from moving when an input is focused. The telltale sign that this is happening is the top of your app scrolls out of view (if using Ionic, your header bar will disappear).
64-
65-
This does *not* prevent any DOM elements from being able to scroll. That needs to happen from CSS and JavaScript, not this plugin.
66-
67-
cordova.plugins.Keyboard.disableScroll(true);
68-
cordova.plugins.Keyboard.disableScroll(false);
69-
70-
Supported Platforms
71-
-------------------
72-
73-
- iOS, Windows
74-
75-
Keyboard.show
76-
=================
77-
78-
Force keyboard to be shown. This typically helps if autofocus on a text element does not pop up the keyboard automatically
79-
80-
cordova.plugins.Keyboard.show();
81-
82-
Supported Platforms
83-
84-
- Android, Blackberry 10, Windows
85-
86-
native.keyboardshow
87-
=================
88-
89-
This event fires when the keyboard will be shown or when the keyboard frame resizes (when switching between keyboards for example)
90-
91-
window.addEventListener('native.keyboardshow', keyboardShowHandler);
92-
93-
function keyboardShowHandler(e){
94-
alert('Keyboard height is: ' + e.keyboardHeight);
95-
}
96-
97-
Properties
98-
-----------
99-
100-
keyboardHeight: the height of the keyboard in pixels
101-
102-
103-
Supported Platforms
104-
-------------------
105-
106-
- iOS, Android, Blackberry 10, Windows
107-
108-
109-
native.keyboardhide
110-
=================
111-
112-
This event fires when the keyboard will hide
113-
114-
window.addEventListener('native.keyboardhide', keyboardHideHandler);
115-
116-
function keyboardHideHandler(e){
117-
alert('Goodnight, sweet prince');
118-
}
119-
120-
Properties
121-
-----------
122-
123-
None
124-
125-
Supported Platforms
126-
-------------------
127-
128-
- iOS, Android, Blackberry 10, Windows
3+
* Installation, API docs: [README_OLD.md](https://github.com/ionic-team/ionic-plugin-keyboard/blob/master/README_OLD.md)

README_OLD.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
Keyboard
2+
======
3+
4+
The `cordova.plugins.Keyboard` object provides functions to make interacting with the keyboard easier, and fires events to indicate that the keyboard will hide/show.
5+
6+
cordova plugin add ionic-plugin-keyboard --save
7+
8+
Methods
9+
-------
10+
11+
- cordova.plugins.Keyboard.hideKeyboardAccessoryBar
12+
- cordova.plugins.Keyboard.close
13+
- cordova.plugins.Keyboard.disableScroll
14+
- cordova.plugins.Keyboard.show
15+
16+
Properties
17+
--------
18+
19+
- cordova.plugins.Keyboard.isVisible
20+
21+
Events
22+
--------
23+
24+
These events are fired on the window.
25+
26+
- native.keyboardshow
27+
* A number `keyboardHeight` is given on the event object, which is the pixel height of the keyboard.
28+
- native.keyboardhide
29+
30+
31+
# API reference
32+
33+
Keyboard.hideKeyboardAccessoryBar
34+
=================
35+
36+
Hide the keyboard accessory bar with the next, previous and done buttons.
37+
38+
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
39+
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(false);
40+
41+
Supported Platforms
42+
-------------------
43+
44+
- iOS
45+
46+
47+
Keyboard.close
48+
=================
49+
50+
Close the keyboard if it is open.
51+
52+
cordova.plugins.Keyboard.close();
53+
54+
Supported Platforms
55+
-------------------
56+
57+
- iOS, Android, Blackberry 10, Windows
58+
59+
60+
Keyboard.disableScroll
61+
=================
62+
63+
Prevent the native UIScrollView from moving when an input is focused. The telltale sign that this is happening is the top of your app scrolls out of view (if using Ionic, your header bar will disappear).
64+
65+
This does *not* prevent any DOM elements from being able to scroll. That needs to happen from CSS and JavaScript, not this plugin.
66+
67+
cordova.plugins.Keyboard.disableScroll(true);
68+
cordova.plugins.Keyboard.disableScroll(false);
69+
70+
Supported Platforms
71+
-------------------
72+
73+
- iOS, Windows
74+
75+
Keyboard.show
76+
=================
77+
78+
Force keyboard to be shown. This typically helps if autofocus on a text element does not pop up the keyboard automatically
79+
80+
cordova.plugins.Keyboard.show();
81+
82+
Supported Platforms
83+
84+
- Android, Blackberry 10, Windows
85+
86+
native.keyboardshow
87+
=================
88+
89+
This event fires when the keyboard will be shown or when the keyboard frame resizes (when switching between keyboards for example)
90+
91+
window.addEventListener('native.keyboardshow', keyboardShowHandler);
92+
93+
function keyboardShowHandler(e){
94+
alert('Keyboard height is: ' + e.keyboardHeight);
95+
}
96+
97+
Properties
98+
-----------
99+
100+
keyboardHeight: the height of the keyboard in pixels
101+
102+
103+
Supported Platforms
104+
-------------------
105+
106+
- iOS, Android, Blackberry 10, Windows
107+
108+
109+
native.keyboardhide
110+
=================
111+
112+
This event fires when the keyboard will hide
113+
114+
window.addEventListener('native.keyboardhide', keyboardHideHandler);
115+
116+
function keyboardHideHandler(e){
117+
alert('Goodnight, sweet prince');
118+
}
119+
120+
Properties
121+
-----------
122+
123+
None
124+
125+
Supported Platforms
126+
-------------------
127+
128+
- iOS, Android, Blackberry 10, Windows

0 commit comments

Comments
 (0)