OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef REMOTING_CLIENT_INPUT_KEYBOARD_INPUT_STRATEGY_H_ | |
6 #define REMOTING_CLIENT_INPUT_KEYBOARD_INPUT_STRATEGY_H_ | |
7 | |
8 #include <queue> | |
9 #include <string> | |
10 | |
11 namespace remoting { | |
12 | |
13 #define ALT_RIGHT 0x01 | |
nicholss
2017/05/12 18:54:16
These are not used yet.
joedow
2017/05/12 19:13:17
drive-by: other native code uses ui::DomCode::ALT_
nicholss
2017/05/12 20:45:58
those are not what I want. I am making a bit mask
| |
14 #define ALT_LEFT 0x02 | |
15 #define SHIFT 0x04 | |
16 #define CTRL 0x08 | |
17 #define CMD 0x10 | |
18 | |
19 struct KeyEvent { | |
joedow
2017/05/12 19:13:17
Could you use the KeyEvent struct in the protobuf
nicholss
2017/05/12 20:45:57
Maybe. the side-effects of the fields in the prot
| |
20 int keycode; | |
21 bool keydown; | |
22 }; | |
23 | |
24 // This is an interface used by |KeyboardInterpreter| to customize how keyboard | |
25 // input is handled. | |
26 class KeyboardInputStrategy { | |
27 public: | |
28 virtual ~KeyboardInputStrategy() {} | |
29 | |
30 // Convert a string to a |KeyEventList|. | |
31 virtual std::queue<KeyEvent> ConvertTextEvent(const std::string& text, | |
32 uint8_t modifiers) = 0; | |
33 | |
34 // Convert a delete to a |KeyEventList|. | |
35 virtual std::queue<KeyEvent> ConvertDeleteEvent(uint8_t modifiers) = 0; | |
36 }; | |
37 | |
38 } // namespace remoting | |
39 #endif // REMOTING_CLIENT_INPUT_KEYBOARD_INPUT_STRATEGY_H_ | |
OLD | NEW |