Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: ui/events/keycodes/keyboard_code_conversion_android.cc

Issue 154983002: Convert android KEYCODE_MOVE_HOME/END correctly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing up the build bot breakage. Added the keycodes to keyboard_code_conversion_android.cc Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/events/keycodes/keyboard_code_conversion_android.h" 5 #include "ui/events/keycodes/keyboard_code_conversion_android.h"
6 6
7 #include <android/keycodes.h> 7 #include <android/keycodes.h>
8 8
9 namespace ui { 9 namespace ui {
10 10
11 namespace { 11 namespace {
12 12
13 // The Android NDK does not provide values for these yet: 13 // The Android NDK does not provide values for these yet:
14 enum { 14 enum {
15 AKEYCODE_ESCAPE = 111, 15 AKEYCODE_ESCAPE = 111,
16 AKEYCODE_FORWARD_DEL = 112, 16 AKEYCODE_FORWARD_DEL = 112,
17 AKEYCODE_CTRL_LEFT = 113, 17 AKEYCODE_CTRL_LEFT = 113,
18 AKEYCODE_CTRL_RIGHT = 114, 18 AKEYCODE_CTRL_RIGHT = 114,
19 AKEYCODE_CAPS_LOCK = 115, 19 AKEYCODE_CAPS_LOCK = 115,
20 AKEYCODE_SCROLL_LOCK = 116, 20 AKEYCODE_SCROLL_LOCK = 116,
21 AKEYCODE_META_LEFT = 117, 21 AKEYCODE_META_LEFT = 117,
22 AKEYCODE_META_RIGHT = 118, 22 AKEYCODE_META_RIGHT = 118,
23 AKEYCODE_BREAK = 121, 23 AKEYCODE_BREAK = 121,
24 AKEYCODE_MOVE_HOME = 122,
25 AKEYCODE_MOVE_END = 123,
24 AKEYCODE_INSERT = 124, 26 AKEYCODE_INSERT = 124,
25 AKEYCODE_MEDIA_PLAY = 126, 27 AKEYCODE_MEDIA_PLAY = 126,
26 AKEYCODE_MEDIA_PAUSE = 127, 28 AKEYCODE_MEDIA_PAUSE = 127,
27 AKEYCODE_F1 = 131, 29 AKEYCODE_F1 = 131,
28 AKEYCODE_F2 = 132, 30 AKEYCODE_F2 = 132,
29 AKEYCODE_F3 = 133, 31 AKEYCODE_F3 = 133,
30 AKEYCODE_F4 = 134, 32 AKEYCODE_F4 = 134,
31 AKEYCODE_F5 = 135, 33 AKEYCODE_F5 = 135,
32 AKEYCODE_F6 = 136, 34 AKEYCODE_F6 = 136,
33 AKEYCODE_F7 = 137, 35 AKEYCODE_F7 = 137,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 return VKEY_RETURN; 75 return VKEY_RETURN;
74 case AKEYCODE_SHIFT_LEFT: 76 case AKEYCODE_SHIFT_LEFT:
75 return VKEY_LSHIFT; 77 return VKEY_LSHIFT;
76 case AKEYCODE_SHIFT_RIGHT: 78 case AKEYCODE_SHIFT_RIGHT:
77 return VKEY_RSHIFT; 79 return VKEY_RSHIFT;
78 // Back will serve as escape, although we may not have access to it. 80 // Back will serve as escape, although we may not have access to it.
79 case AKEYCODE_BACK: 81 case AKEYCODE_BACK:
80 return VKEY_ESCAPE; 82 return VKEY_ESCAPE;
81 case AKEYCODE_SPACE: 83 case AKEYCODE_SPACE:
82 return VKEY_SPACE; 84 return VKEY_SPACE;
83 case AKEYCODE_HOME: 85 case AKEYCODE_MOVE_HOME:
84 return VKEY_HOME; 86 return VKEY_HOME;
85 case AKEYCODE_DPAD_LEFT: 87 case AKEYCODE_DPAD_LEFT:
86 return VKEY_LEFT; 88 return VKEY_LEFT;
87 case AKEYCODE_DPAD_UP: 89 case AKEYCODE_DPAD_UP:
88 return VKEY_UP; 90 return VKEY_UP;
89 case AKEYCODE_DPAD_RIGHT: 91 case AKEYCODE_DPAD_RIGHT:
90 return VKEY_RIGHT; 92 return VKEY_RIGHT;
91 case AKEYCODE_DPAD_DOWN: 93 case AKEYCODE_DPAD_DOWN:
92 return VKEY_DOWN; 94 return VKEY_DOWN;
93 case AKEYCODE_0: 95 case AKEYCODE_0:
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 case AKEYCODE_RIGHT_BRACKET: 196 case AKEYCODE_RIGHT_BRACKET:
195 return VKEY_OEM_6; 197 return VKEY_OEM_6;
196 case AKEYCODE_MUTE: 198 case AKEYCODE_MUTE:
197 case AKEYCODE_VOLUME_MUTE: 199 case AKEYCODE_VOLUME_MUTE:
198 return VKEY_VOLUME_MUTE; 200 return VKEY_VOLUME_MUTE;
199 case AKEYCODE_ESCAPE: 201 case AKEYCODE_ESCAPE:
200 return VKEY_ESCAPE; 202 return VKEY_ESCAPE;
201 case AKEYCODE_MEDIA_PLAY: 203 case AKEYCODE_MEDIA_PLAY:
202 case AKEYCODE_MEDIA_PLAY_PAUSE: 204 case AKEYCODE_MEDIA_PLAY_PAUSE:
203 return VKEY_MEDIA_PLAY_PAUSE; 205 return VKEY_MEDIA_PLAY_PAUSE;
204 case AKEYCODE_CALL: 206 case AKEYCODE_MOVE_END:
205 return VKEY_END; 207 return VKEY_END;
206 case AKEYCODE_ALT_LEFT: 208 case AKEYCODE_ALT_LEFT:
207 return VKEY_LMENU; 209 return VKEY_LMENU;
208 case AKEYCODE_ALT_RIGHT: 210 case AKEYCODE_ALT_RIGHT:
209 return VKEY_RMENU; 211 return VKEY_RMENU;
210 case AKEYCODE_GRAVE: 212 case AKEYCODE_GRAVE:
211 return VKEY_OEM_3; 213 return VKEY_OEM_3;
212 case AKEYCODE_APOSTROPHE: 214 case AKEYCODE_APOSTROPHE:
213 return VKEY_OEM_3; 215 return VKEY_OEM_3;
214 case AKEYCODE_MEDIA_REWIND: 216 case AKEYCODE_MEDIA_REWIND:
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 case AKEYCODE_CHANNEL_UP: 298 case AKEYCODE_CHANNEL_UP:
297 return VKEY_PRIOR; 299 return VKEY_PRIOR;
298 case AKEYCODE_CHANNEL_DOWN: 300 case AKEYCODE_CHANNEL_DOWN:
299 return VKEY_NEXT; 301 return VKEY_NEXT;
300 default: 302 default:
301 return VKEY_UNKNOWN; 303 return VKEY_UNKNOWN;
302 } 304 }
303 } 305 }
304 306
305 } // namespace ui 307 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698