Skip to content

Commit 4fedd80

Browse files
cwhuangJean-Baptiste Queru
authored andcommitted
Add keycodes PageUp and PageDown
This is useful for applications like web browser. Change-Id: Ie9262d5b75de87ecd0971407a7c3ce9aa6e4998e
1 parent ef9d148 commit 4fedd80

File tree

4 files changed

+33
-3
lines changed

4 files changed

+33
-3
lines changed

api/current.xml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153221,6 +153221,28 @@
153221153221
visibility="public"
153222153222
>
153223153223
</field>
153224+
<field name="KEYCODE_PAGE_DOWN"
153225+
type="int"
153226+
transient="false"
153227+
volatile="false"
153228+
value="93"
153229+
static="true"
153230+
final="true"
153231+
deprecated="not deprecated"
153232+
visibility="public"
153233+
>
153234+
</field>
153235+
<field name="KEYCODE_PAGE_UP"
153236+
type="int"
153237+
transient="false"
153238+
volatile="false"
153239+
value="92"
153240+
static="true"
153241+
final="true"
153242+
deprecated="not deprecated"
153243+
visibility="public"
153244+
>
153245+
</field>
153224153246
<field name="KEYCODE_PERIOD"
153225153247
type="int"
153226153248
transient="false"
@@ -197185,7 +197207,7 @@
197185197207
deprecated="not deprecated"
197186197208
visibility="public"
197187197209
>
197188-
<parameter name="t" type="T">
197210+
<parameter name="arg0" type="T">
197189197211
</parameter>
197190197212
</method>
197191197213
</interface>

core/java/android/view/KeyEvent.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ public class KeyEvent implements Parcelable {
120120
public static final int KEYCODE_MEDIA_REWIND = 89;
121121
public static final int KEYCODE_MEDIA_FAST_FORWARD = 90;
122122
public static final int KEYCODE_MUTE = 91;
123+
public static final int KEYCODE_PAGE_UP = 92;
124+
public static final int KEYCODE_PAGE_DOWN = 93;
123125

124126
// NOTE: If you add a new keycode here you must also add it to:
125127
// isSystem()
@@ -135,7 +137,7 @@ public class KeyEvent implements Parcelable {
135137
// those new codes. This is intended to maintain a consistent
136138
// set of key code definitions across all Android devices.
137139

138-
private static final int LAST_KEYCODE = KEYCODE_MUTE;
140+
private static final int LAST_KEYCODE = KEYCODE_PAGE_DOWN;
139141

140142
/**
141143
* @deprecated There are now more than MAX_KEYCODE keycodes.

core/res/res/values/attrs.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,8 @@
912912
<enum name="KEYCODE_MEDIA_REWIND" value="89" />
913913
<enum name="KEYCODE_MEDIA_FAST_FORWARD" value="90" />
914914
<enum name="KEYCODE_MUTE" value="91" />
915+
<enum name="KEYCODE_PAGE_UP" value="92" />
916+
<enum name="KEYCODE_PAGE_DOWN" value="93" />
915917
</attr>
916918

917919
<!-- ***************************************************************** -->

include/ui/KeycodeLabels.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ static const KeycodeLabel KEYCODES[] = {
114114
{ "MEDIA_REWIND", 89 },
115115
{ "MEDIA_FAST_FORWARD", 90 },
116116
{ "MUTE", 91 },
117+
{ "PAGE_UP", 92 },
118+
{ "PAGE_DOWN", 93 },
117119

118120
// NOTE: If you add a new keycode here you must also add it to:
119121
// (enum KeyCode, in this file)
@@ -218,7 +220,9 @@ typedef enum KeyCode {
218220
kKeyCodePreviousSong = 88,
219221
kKeyCodeRewind = 89,
220222
kKeyCodeForward = 90,
221-
kKeyCodeMute = 91
223+
kKeyCodeMute = 91,
224+
kKeyCodePageUp = 92,
225+
kKeyCodePageDown = 93
222226
} KeyCode;
223227

224228
static const KeycodeLabel FLAGS[] = {

0 commit comments

Comments
 (0)