开发者

Disable keyboard shortcuts for external keyboard

开发者 https://www.devze.com 2023-02-27 06:14 出处:网络
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 inte开发者_如

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 inte开发者_如何学Gorfere 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?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消