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

Side by Side Diff: remoting/client/jni/android_keymap.cc

Issue 21236002: Chromoting Android app mouse/keyboard bugfixes and enhancements (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One last (TODO) comment change Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « remoting/client/jni/android_keymap.h ('k') | remoting/client/jni/chromoting_jni_instance.h » ('j') | 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 "remoting/client/jni/android_keymap.h" 5 #include "remoting/client/jni/android_keymap.h"
6 6
7 #include "base/logging.h"
8
7 namespace { 9 namespace {
8 10
9 // These must be defined in the same order as the Android keycodes in 11 // These must be defined in the same order as the Android keycodes in
10 // <android/keycodes.h> and 12 // <android/keycodes.h> and
11 // "ui/base/keycodes/keyboard_code_conversion_android.cc" . Some of these 13 // "ui/base/keycodes/keyboard_code_conversion_android.cc" . Some of these
12 // mappings assume a US keyboard layout for now. 14 // mappings assume a US keyboard layout for now.
13 const uint32 usb_keycodes[] = { 15 const uint32 usb_keycodes[] = {
14 0, // UNKNOWN 16 0, // UNKNOWN
15 0, // SOFT_LEFT 17 0, // SOFT_LEFT
16 0, // SOFT_RIGHT 18 0, // SOFT_RIGHT
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 0x070058, // NUMPAD_ENTER 196 0x070058, // NUMPAD_ENTER
195 0x070067, // NUMPAD_EQUALS 197 0x070067, // NUMPAD_EQUALS
196 0x0700b6, // NUMPAD_LEFT_PAREN 198 0x0700b6, // NUMPAD_LEFT_PAREN
197 0x0700b7, // NUMPAD_RIGHT_PAREN 199 0x0700b7, // NUMPAD_RIGHT_PAREN
198 }; 200 };
199 201
200 } 202 }
201 203
202 namespace remoting { 204 namespace remoting {
203 205
204 uint32 AndroidKeycodeToUsbKeycode(int android) { 206 uint32 AndroidKeycodeToUsbKeycode(size_t android) {
207 DCHECK_LT(android, sizeof (usb_keycodes) / sizeof (uint32));
208
205 return usb_keycodes[android]; 209 return usb_keycodes[android];
206 } 210 }
207 211
208 } // namespace remoting 212 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/jni/android_keymap.h ('k') | remoting/client/jni/chromoting_jni_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698