OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "apps/moterm/key_util.h" | 5 #include "apps/moterm/key_util.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "mojo/services/input_events/public/interfaces/input_events.mojom.h" | 8 #include "mojo/services/input_events/interfaces/input_events.mojom.h" |
9 #include "mojo/services/input_events/public/interfaces/input_key_codes.mojom.h" | 9 #include "mojo/services/input_events/interfaces/input_key_codes.mojom.h" |
10 | 10 |
11 // TODO(vtl): Handle more stuff and verify that we're consistent about the | 11 // TODO(vtl): Handle more stuff and verify that we're consistent about the |
12 // sequences we generate. | 12 // sequences we generate. |
13 // TODO(vtl): In particular, our implementation of keypad_application_mode is | 13 // TODO(vtl): In particular, our implementation of keypad_application_mode is |
14 // incomplete. | 14 // incomplete. |
15 std::string GetInputSequenceForKeyPressedEvent(const mojo::Event& key_event, | 15 std::string GetInputSequenceForKeyPressedEvent(const mojo::Event& key_event, |
16 bool keypad_application_mode) { | 16 bool keypad_application_mode) { |
17 DCHECK_EQ(key_event.action, mojo::EventType::KEY_PRESSED); | 17 DCHECK_EQ(key_event.action, mojo::EventType::KEY_PRESSED); |
18 CHECK(key_event.key_data); | 18 CHECK(key_event.key_data); |
19 const mojo::KeyData& key_data = *key_event.key_data; | 19 const mojo::KeyData& key_data = *key_event.key_data; |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 case mojo::KeyboardCode::ALTGR: | 243 case mojo::KeyboardCode::ALTGR: |
244 NOTIMPLEMENTED() << "Key code " << key_data.windows_key_code; | 244 NOTIMPLEMENTED() << "Key code " << key_data.windows_key_code; |
245 break; | 245 break; |
246 | 246 |
247 default: | 247 default: |
248 LOG(WARNING) << "Unknown key code " << key_data.windows_key_code; | 248 LOG(WARNING) << "Unknown key code " << key_data.windows_key_code; |
249 break; | 249 break; |
250 } | 250 } |
251 return std::string(); | 251 return std::string(); |
252 } | 252 } |
OLD | NEW |