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 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 6 #error "This file requires ARC support." |
| 7 #endif |
| 8 |
| 9 #import "remoting/ios/client_keyboard.h" |
| 10 |
| 11 // TODO(nicholss): Look into inputAccessoryView to get the top bar for sending |
| 12 // special keys. |
| 13 // TODO(nicholss): Look into inputView - The custom input view to display when |
| 14 // the receiver becomes the first responder |
| 15 |
| 16 @implementation ClientKeyboard |
| 17 |
| 18 @synthesize autocapitalizationType = _autocapitalizationType; |
| 19 @synthesize autocorrectionType = _autocorrectionType; |
| 20 @synthesize keyboardAppearance = _keyboardAppearance; |
| 21 @synthesize keyboardType = _keyboardType; |
| 22 @synthesize spellCheckingType = _spellCheckingType; |
| 23 |
| 24 - (instancetype)init { |
| 25 self = [super init]; |
| 26 if (self) { |
| 27 _autocapitalizationType = UITextAutocapitalizationTypeNone; |
| 28 _autocorrectionType = UITextAutocorrectionTypeNo; |
| 29 _autocorrectionType = UITextAutocorrectionTypeNo; |
| 30 _keyboardType = UIKeyboardTypeASCIICapable; |
| 31 _spellCheckingType = UITextSpellCheckingTypeNo; |
| 32 } |
| 33 return self; |
| 34 } |
| 35 |
| 36 #pragma mark - UIKeyInput |
| 37 |
| 38 - (void)insertText:(NSString*)text { |
| 39 NSLog(@"insertText: %@", text); |
| 40 } |
| 41 |
| 42 - (void)deleteBackward { |
| 43 NSLog(@"deleteBackward"); |
| 44 } |
| 45 |
| 46 - (BOOL)hasText { |
| 47 return NO; // not sure if this enables the back button. |
| 48 } |
| 49 |
| 50 #pragma mark - UIResponder |
| 51 |
| 52 - (BOOL)canBecomeFirstResponder { |
| 53 return YES; |
| 54 } |
| 55 |
| 56 - (UIView*)inputAccessoryView { |
| 57 return nil; |
| 58 } |
| 59 |
| 60 #pragma mark - UITextInputTraits |
| 61 |
| 62 @end |
OLD | NEW |