Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(406)

Unified Diff: remoting/ios/client_keyboard.mm

Issue 2868383003: [CRD iOS] Send key events to the session. (Closed)
Patch Set: Update based on feedback. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/ios/client_keyboard.h ('k') | remoting/ios/key_input.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/ios/client_keyboard.mm
diff --git a/remoting/ios/client_keyboard.mm b/remoting/ios/client_keyboard.mm
index dccefab1bdadc93b6233cde12620eaff138366a8..ccdf84ae75c56881b078a007e1c734c9b8766100 100644
--- a/remoting/ios/client_keyboard.mm
+++ b/remoting/ios/client_keyboard.mm
@@ -21,13 +21,18 @@
@synthesize keyboardType = _keyboardType;
@synthesize spellCheckingType = _spellCheckingType;
+@synthesize delegate = _delegate;
+
+// TODO(nicholss): For physical keyboard, look at UIKeyCommand
+// https://developer.apple.com/reference/uikit/uikeycommand?language=objc
+
- (instancetype)init {
self = [super init];
if (self) {
_autocapitalizationType = UITextAutocapitalizationTypeNone;
_autocorrectionType = UITextAutocorrectionTypeNo;
_autocorrectionType = UITextAutocorrectionTypeNo;
- _keyboardType = UIKeyboardTypeASCIICapable;
+ _keyboardType = UIKeyboardTypeDefault;
_spellCheckingType = UITextSpellCheckingTypeNo;
}
return self;
@@ -36,15 +41,15 @@
#pragma mark - UIKeyInput
- (void)insertText:(NSString*)text {
- NSLog(@"insertText: %@", text);
+ [_delegate clientKeyboardShouldSend:text];
}
- (void)deleteBackward {
- NSLog(@"deleteBackward");
+ [_delegate clientKeyboardShouldDelete];
}
- (BOOL)hasText {
- return NO; // not sure if this enables the back button.
+ return NO;
}
#pragma mark - UIResponder
« no previous file with comments | « remoting/ios/client_keyboard.h ('k') | remoting/ios/key_input.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698