R. Dewi
R. Dewi

Reputation: 4271

Disable keyboard shortcuts for external keyboard

I'm trying to make a simple editor using UITextview on iPad. Everything was going fine until I tried my app on a device using an external keyboard. There are some keyboard shortcuts that interfere with my app: Command + Delete, Option + Delete, and others.

I think I don't need some of these shortcuts, so I want to disable them. Can I do that? Can somebody tell me how to do that?

Upvotes: 1

Views: 499

Answers (1)

arun kumar
arun kumar

Reputation: 11

Disabling keyboard when touched anywhere on view other than text field using UItTouch events

- (void) touchesBegan: (NSSet *) touches withEvent: (UIEvent *) event {  
    if (myTextField) {  
        if ([myTextField canResignFirstResponder]) [myTextField resignFirstResponder];  
    }  
    [super touchesBegan: touches withEvent: event];  
} 

For more details please visit my blog:

http://aruntheiphonedeveloper.blogspot.com/2011/05/disabing-keyboard-using-uitouch-event.html

Upvotes: 1

Related Questions