OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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)keyboardActionKeyCode:(uint32_t)keyPressed isKeyDown:(BOOL)keyDown; |
| 22 |
| 23 - (void)keyboardDismissed; |
| 24 |
| 25 @end |
| 26 |
| 27 @interface KeyInput : UIView<UIKeyInput> |
| 28 |
| 29 @property(weak, nonatomic) id<KeyInputDelegate> delegate; |
| 30 |
| 31 - (void)ctrlAltDel; |
| 32 |
| 33 @end |
| 34 |
| 35 #endif // REMOTING_IOS_KEY_INPUT_H_ |
OLD | NEW |