OLD | NEW |
| (Empty) |
1 // Copyright 2016 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_IOS_KEY_INPUT_H_ | |
6 #define REMOTING_IOS_KEY_INPUT_H_ | |
7 | |
8 #import <Foundation/Foundation.h> | |
9 #import <UIKit/UIKit.h> | |
10 | |
11 // Key codes are translated from the on screen keyboard to the scan codes | |
12 // needed for Chromoting input. We don't have a good automated approach to do | |
13 // this. Instead we have created a mapping manually via trial and error. To | |
14 // support other keyboards in this context we would have to test and create a | |
15 // mapping for each keyboard manually. | |
16 | |
17 // Contract to handle translated key presses from the on-screen keyboard to | |
18 // the format required for Chromoting keyboard input. | |
19 @protocol KeyInputDelegate<NSObject> | |
20 | |
21 - (void)keyboardShown; | |
22 | |
23 - (void)keyboardDismissed; | |
24 | |
25 - (void)keyboardActionKeyCode:(uint32_t)keyPressed isKeyDown:(BOOL)keyDown; | |
26 | |
27 @end | |
28 | |
29 @interface KeyInput : UIView<UIKeyInput> | |
30 | |
31 @property(weak, nonatomic) id<KeyInputDelegate> delegate; | |
32 @property(readonly) BOOL keyboardVisible; | |
33 @property(readonly) CGFloat keyboardHeight; | |
34 | |
35 - (void)ctrlAltDel; | |
36 | |
37 @end | |
38 | |
39 #endif // REMOTING_IOS_KEY_INPUT_H_ | |
OLD | NEW |