Reputation: 8150
So the UITextField can take keyboard input, but is there any way to detect when a particular button on the keyboard (in particular external keyboards) is pressed/released?
If not, is it possible to hook directly to bluetooth keyboards for iPad/iPhone and get their signals directly?
Upvotes: 1
Views: 572
Reputation: 1131
You can use a UITextField for user input and implement its delegate methods in order to control what the user is typing. You can implement
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
which is called every time the user enters a character in the text field, and check the character entered in there.
Upvotes: 3