| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.h" | 5 #include "ui/events/keycodes/keyboard_code_conversion.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ui/events/event_constants.h" | 9 #include "ui/events/event_constants.h" |
| 10 #include "ui/events/keycodes/dom3/dom_code.h" | 10 #include "ui/events/keycodes/dom/dom_code.h" |
| 11 #include "ui/events/keycodes/dom3/dom_key.h" | 11 #include "ui/events/keycodes/dom/dom_key.h" |
| 12 #include "ui/events/keycodes/dom_us_layout_data.h" | 12 #include "ui/events/keycodes/dom_us_layout_data.h" |
| 13 | 13 |
| 14 namespace ui { | 14 namespace ui { |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 // This table maps a subset of |KeyboardCode| (VKEYs) to DomKey and character. | 18 // This table maps a subset of |KeyboardCode| (VKEYs) to DomKey and character. |
| 19 // Only values not otherwise handled by GetMeaningFromKeyCode() are here. | 19 // Only values not otherwise handled by GetMeaningFromKeyCode() are here. |
| 20 const struct KeyboardCodeToMeaning { | 20 const struct KeyboardCodeToMeaning { |
| 21 KeyboardCode key_code; | 21 KeyboardCode key_code; |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 return it.dom_code; | 536 return it.dom_code; |
| 537 } | 537 } |
| 538 for (const auto& it : kFallbackKeyboardCodeToDomCodeMap) { | 538 for (const auto& it : kFallbackKeyboardCodeToDomCodeMap) { |
| 539 if (it.key_code == key_code) | 539 if (it.key_code == key_code) |
| 540 return it.dom_code; | 540 return it.dom_code; |
| 541 } | 541 } |
| 542 return DomCode::NONE; | 542 return DomCode::NONE; |
| 543 } | 543 } |
| 544 | 544 |
| 545 } // namespace ui | 545 } // namespace ui |
| OLD | NEW |