OLD | NEW |
---|---|
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 namespace { | 10 namespace { |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
92 return DomKey::SHIFT; | 92 return DomKey::SHIFT; |
93 case AKEYCODE_TAB: | 93 case AKEYCODE_TAB: |
94 return DomKey::TAB; | 94 return DomKey::TAB; |
95 case AKEYCODE_SYM: | 95 case AKEYCODE_SYM: |
96 return DomKey::SYMBOL; | 96 return DomKey::SYMBOL; |
97 case AKEYCODE_EXPLORER: | 97 case AKEYCODE_EXPLORER: |
98 return DomKey::LAUNCH_WEB_BROWSER; | 98 return DomKey::LAUNCH_WEB_BROWSER; |
99 case AKEYCODE_ENVELOPE: | 99 case AKEYCODE_ENVELOPE: |
100 return DomKey::LAUNCH_MAIL; | 100 return DomKey::LAUNCH_MAIL; |
101 case AKEYCODE_ENTER: | 101 case AKEYCODE_ENTER: |
102 case AKEYCODE_BUTTON_A: | |
dtapuska
2016/02/09 14:34:38
There is a comment that you didn't remove at the e
| |
102 return DomKey::ENTER; | 103 return DomKey::ENTER; |
103 case AKEYCODE_DEL: | 104 case AKEYCODE_DEL: |
104 return DomKey::BACKSPACE; | 105 return DomKey::BACKSPACE; |
105 case AKEYCODE_MENU: | 106 case AKEYCODE_MENU: |
106 return DomKey::CONTEXT_MENU; | 107 return DomKey::CONTEXT_MENU; |
107 case AKEYCODE_SEARCH: | 108 case AKEYCODE_SEARCH: |
108 return DomKey::BROWSER_SEARCH; | 109 return DomKey::BROWSER_SEARCH; |
109 case AKEYCODE_MEDIA_PLAY_PAUSE: | 110 case AKEYCODE_MEDIA_PLAY_PAUSE: |
110 return DomKey::MEDIA_PLAY_PAUSE; | 111 return DomKey::MEDIA_PLAY_PAUSE; |
111 case AKEYCODE_MEDIA_STOP: | 112 case AKEYCODE_MEDIA_STOP: |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
455 // Does not provide all key codes, and does not handle all keys. | 456 // Does not provide all key codes, and does not handle all keys. |
456 switch (keycode) { | 457 switch (keycode) { |
457 case AKEYCODE_DEL: | 458 case AKEYCODE_DEL: |
458 return VKEY_BACK; | 459 return VKEY_BACK; |
459 case AKEYCODE_TAB: | 460 case AKEYCODE_TAB: |
460 return VKEY_TAB; | 461 return VKEY_TAB; |
461 case AKEYCODE_CLEAR: | 462 case AKEYCODE_CLEAR: |
462 return VKEY_CLEAR; | 463 return VKEY_CLEAR; |
463 case AKEYCODE_DPAD_CENTER: | 464 case AKEYCODE_DPAD_CENTER: |
464 case AKEYCODE_ENTER: | 465 case AKEYCODE_ENTER: |
466 case AKEYCODE_BUTTON_A: | |
465 return VKEY_RETURN; | 467 return VKEY_RETURN; |
466 case AKEYCODE_SHIFT_LEFT: | 468 case AKEYCODE_SHIFT_LEFT: |
467 return VKEY_LSHIFT; | 469 return VKEY_LSHIFT; |
468 case AKEYCODE_SHIFT_RIGHT: | 470 case AKEYCODE_SHIFT_RIGHT: |
469 return VKEY_RSHIFT; | 471 return VKEY_RSHIFT; |
470 case AKEYCODE_BACK: | 472 case AKEYCODE_BACK: |
471 return VKEY_BROWSER_BACK; | 473 return VKEY_BROWSER_BACK; |
472 case AKEYCODE_FORWARD: | 474 case AKEYCODE_FORWARD: |
473 return VKEY_BROWSER_FORWARD; | 475 return VKEY_BROWSER_FORWARD; |
474 case AKEYCODE_SPACE: | 476 case AKEYCODE_SPACE: |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
689 case AKEYCODE_CHANNEL_UP: | 691 case AKEYCODE_CHANNEL_UP: |
690 return VKEY_PRIOR; | 692 return VKEY_PRIOR; |
691 case AKEYCODE_CHANNEL_DOWN: | 693 case AKEYCODE_CHANNEL_DOWN: |
692 return VKEY_NEXT; | 694 return VKEY_NEXT; |
693 default: | 695 default: |
694 return VKEY_UNKNOWN; | 696 return VKEY_UNKNOWN; |
695 } | 697 } |
696 } | 698 } |
697 | 699 |
698 } // namespace ui | 700 } // namespace ui |
OLD | NEW |